wok view hostapd/stuff/hostapd @ rev 18734
Remove redundant messages in {pre|post}_{install|remove}() in random packages
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Dec 21 02:53:09 2015 +0200 (2015-12-21) |
parents | f4ab8a128b6f |
children | 7f188676b59c |
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 echo "$NAME already running."
19 exit 1
20 fi
21 echo -n "Starting $DESC: $NAME... "
22 $DAEMON $OPTIONS
23 status
24 ;;
25 stop)
26 if ! active_pidfile $PIDFILE hostapd ; then
27 echo "$NAME is not running."
28 exit 1
29 fi
30 echo -n "Stopping $DESC: $NAME... "
31 kill `cat $PIDFILE`
32 status
33 ;;
34 restart)
35 if ! active_pidfile $PIDFILE hostapd ; then
36 echo "$NAME is not running."
37 exit 1
38 fi
39 echo -n "Restarting $DESC: $NAME... "
40 kill `cat $PIDFILE`
41 sleep 2
42 $DAEMON $OPTIONS
43 status
44 ;;
45 *)
46 echo ""
47 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
48 echo ""
49 exit 1
50 ;;
51 esac
53 exit 0