wok annotate hostapd/stuff/hostapd @ rev 22117
updated vsftpd (2.3.5 -> 3.0.3)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 02 16:53:53 2019 +0100 (2019-11-02) |
parents | 8ebec64e4191 |
children | 85d57ffe7860 |
rev | line source |
---|---|
gokhlayeh@5824 | 1 #!/bin/sh |
gokhlayeh@5824 | 2 # /etc/init.d/dbus: Start, stop and restart DBUS daemon on SliTaz, |
gokhlayeh@5824 | 3 # at boot time or with the command line. Daemons options are configured |
gokhlayeh@5824 | 4 # with /etc/daemons.conf |
gokhlayeh@5824 | 5 # |
gokhlayeh@5824 | 6 . /etc/init.d/rc.functions |
gokhlayeh@5824 | 7 . /etc/daemons.conf |
gokhlayeh@5824 | 8 |
gokhlayeh@5824 | 9 NAME=hostapd |
al@19159 | 10 DESC="$(_ 'daemon for wireless software access points')" |
gokhlayeh@5824 | 11 DAEMON=/usr/bin/hostapd |
gokhlayeh@5824 | 12 PIDFILE=/var/run/hostapd.pid |
gokhlayeh@5824 | 13 OPTIONS="-B -P $PIDFILE /etc/hostapd/hostapd.conf" |
gokhlayeh@5824 | 14 |
gokhlayeh@5824 | 15 case "$1" in |
gokhlayeh@5824 | 16 start) |
pascal@15577 | 17 if active_pidfile $PIDFILE hostapd ; then |
al@19159 | 18 _ '%s is already running.' $NAME |
gokhlayeh@5824 | 19 exit 1 |
gokhlayeh@5824 | 20 fi |
al@19159 | 21 action 'Starting %s: %s...' "$DESC" $NAME |
gokhlayeh@5824 | 22 $DAEMON $OPTIONS |
gokhlayeh@5824 | 23 status |
gokhlayeh@5824 | 24 ;; |
gokhlayeh@5824 | 25 stop) |
pascal@15577 | 26 if ! active_pidfile $PIDFILE hostapd ; then |
al@19159 | 27 _ '%s is not running.' $NAME |
gokhlayeh@5824 | 28 exit 1 |
gokhlayeh@5824 | 29 fi |
al@19159 | 30 action 'Stopping %s: %s...' "$DESC" $NAME |
al@19159 | 31 kill $(cat $PIDFILE) |
gokhlayeh@5824 | 32 status |
gokhlayeh@5824 | 33 ;; |
gokhlayeh@5824 | 34 restart) |
pascal@15577 | 35 if ! active_pidfile $PIDFILE hostapd ; then |
al@19159 | 36 _ '%s is not running.' $NAME |
gokhlayeh@5824 | 37 exit 1 |
gokhlayeh@5824 | 38 fi |
al@19159 | 39 action 'Restarting %s: %s...' "$DESC" $NAME |
al@19159 | 40 kill $(cat $PIDFILE) |
gokhlayeh@5824 | 41 sleep 2 |
gokhlayeh@5824 | 42 $DAEMON $OPTIONS |
gokhlayeh@5824 | 43 status |
gokhlayeh@5824 | 44 ;; |
gokhlayeh@5824 | 45 *) |
al@19159 | 46 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" |
al@19159 | 47 newline |
gokhlayeh@5824 | 48 exit 1 |
gokhlayeh@5824 | 49 ;; |
gokhlayeh@5824 | 50 esac |
gokhlayeh@5824 | 51 |
al@19159 | 52 exit 0 |