wok annotate hostapd/stuff/hostapd @ rev 8713
Fixed avidemux.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Feb 17 18:20:31 2011 +0000 (2011-02-17) |
parents | |
children | 8ebec64e4191 |
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 |
gokhlayeh@5824 | 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) |
gokhlayeh@5824 | 17 if [ -f $PIDFILE ] ; then |
gokhlayeh@5824 | 18 echo "$NAME already running." |
gokhlayeh@5824 | 19 exit 1 |
gokhlayeh@5824 | 20 fi |
gokhlayeh@5824 | 21 echo -n "Starting $DESC: $NAME... " |
gokhlayeh@5824 | 22 $DAEMON $OPTIONS |
gokhlayeh@5824 | 23 status |
gokhlayeh@5824 | 24 ;; |
gokhlayeh@5824 | 25 stop) |
gokhlayeh@5824 | 26 if [ ! -f $PIDFILE ] ; then |
gokhlayeh@5824 | 27 echo "$NAME is not running." |
gokhlayeh@5824 | 28 exit 1 |
gokhlayeh@5824 | 29 fi |
gokhlayeh@5824 | 30 echo -n "Stopping $DESC: $NAME... " |
gokhlayeh@5824 | 31 kill `cat $PIDFILE` |
gokhlayeh@5824 | 32 status |
gokhlayeh@5824 | 33 ;; |
gokhlayeh@5824 | 34 restart) |
gokhlayeh@5824 | 35 if [ ! -f $PIDFILE ] ; then |
gokhlayeh@5824 | 36 echo "$NAME is not running." |
gokhlayeh@5824 | 37 exit 1 |
gokhlayeh@5824 | 38 fi |
gokhlayeh@5824 | 39 echo -n "Restarting $DESC: $NAME... " |
gokhlayeh@5824 | 40 kill `cat $PIDFILE` |
gokhlayeh@5824 | 41 sleep 2 |
gokhlayeh@5824 | 42 $DAEMON $OPTIONS |
gokhlayeh@5824 | 43 status |
gokhlayeh@5824 | 44 ;; |
gokhlayeh@5824 | 45 *) |
gokhlayeh@5824 | 46 echo "" |
gokhlayeh@5824 | 47 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" |
gokhlayeh@5824 | 48 echo "" |
gokhlayeh@5824 | 49 exit 1 |
gokhlayeh@5824 | 50 ;; |
gokhlayeh@5824 | 51 esac |
gokhlayeh@5824 | 52 |
gokhlayeh@5824 | 53 exit 0 |