wok view hostapd/stuff/hostapd @ rev 20478

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