Init-Script fuer hostapd unter openSUSE: Unterschied zwischen den Versionen
(Die Seite wurde neu angelegt: '''Shellscripte''' = Init-Script für hostapd unter openSUSE = <br/> Ein Init-Script zum Starten/Stoppen des hostapd für openSUSE.<br/><br/> <pre> #!/bin/sh # # w...) |
K (TomcatMJ verschob Seite Init-Script für hostapd unter openSUSE nach Init-Script fuer hostapd unter openSUSE: Umlautsalat korrigiert) |
(kein Unterschied)
| |
Aktuelle Version vom 20. November 2013, 20:11 Uhr
Init-Script für hostapd unter openSUSE
Ein Init-Script zum Starten/Stoppen des hostapd für openSUSE.
#!/bin/sh
#
# wireless lan accesspoint configuration
#
# Author: b3ll3roph0n <b3ll3roph0n@gmx.net>
#
# /etc/init.d/hostapd
#
### BEGIN INIT INFO
# Provides: hostapd
# Required-Start: $syslog $remote_fs $network
# Should-Start:
# Required-Stop: $syslog $remote_fs
# Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: hostap-daemon (wlan ap)
# Description: Start hostapd for a wireless lan accesspoint
### END INIT INFO
AP_BIN=/usr/sbin/hostapd
test -x $AP_BIN || { echo "$AP_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
AP_CONFIG=/etc/hostapd.conf
test -r $AP_CONFIG || { echo "$AP_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
. /etc/rc.status
rc_reset
case "$1" in
start)
echo -n "Starting hostapd ";
/sbin/startproc $AP_BIN $AP_CONFIG;
rc_status -v
;;
stop)
echo -n "Shutting down hostapd ";
/sbin/killproc -TERM $AP_BIN;
rc_status -v
;;
restart)
$0 stop;
$0 start;
rc_status
;;
status)
echo -n "Checking for service hostapd "
/sbin/checkproc $AP_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|restart}":
exit 1;
;;
esac;
rc_exit
# End of file