wok annotate wicd/stuff/wicd @ rev 3575

Add python-pyyaml
author Liu Peng <rocky@slitaz.org>
date Fri Jun 26 01:17:10 2009 +0000 (2009-06-26)
parents
children 71029d3139fa
rev   line source
jozee@2733 1 #!/bin/sh
jozee@2733 2 # /etc/init.d/wicd: Start, stop and restart deamon on SliTaz, at boot
jozee@2733 3 # time or with the command line.
jozee@2733 4 #
jozee@2733 5 # To start daemon at boot time, just put the right name in the $RUN_DAEMONS
jozee@2733 6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf.
jozee@2733 7 #
jozee@2733 8 . /etc/init.d/rc.functions
jozee@2733 9 . /etc/daemons.conf
jozee@2733 10
jozee@2733 11 NAME=Wicd
jozee@2733 12 DESC="Network connection manager"
jozee@2733 13 DAEMON=/usr/sbin/wicd
jozee@2733 14 OPTIONS=$WICD_OPTIONS
jozee@2733 15 PIDFILE=/var/run/wicd/wicd.pid
jozee@2733 16
jozee@2733 17 case "$1" in
jozee@2733 18 start)
jozee@2733 19 if [ -f $PIDFILE ] ; then
jozee@2733 20 echo "$NAME already running."
jozee@2733 21 exit 1
jozee@2733 22 fi
jozee@2733 23 echo -n "Starting $DESC: $NAME... "
jozee@2733 24 $DAEMON $OPTIONS
jozee@2733 25 status
jozee@2733 26 ;;
jozee@2733 27 stop)
jozee@2733 28 if [ ! -f $PIDFILE ] ; then
jozee@2733 29 echo "$NAME is not running."
jozee@2733 30 exit 1
jozee@2733 31 fi
jozee@2733 32 echo -n "Stopping $DESC: $NAME... "
jozee@2733 33 kill `cat $PIDFILE`
jozee@2733 34 rm $PIDFILE
jozee@2733 35 status
jozee@2733 36 ;;
jozee@2733 37 restart)
jozee@2733 38 if [ ! -f $PIDFILE ] ; then
jozee@2733 39 echo "$NAME is not running."
jozee@2733 40 exit 1
jozee@2733 41 fi
jozee@2733 42 echo -n "Restarting $DESC: $NAME... "
jozee@2733 43 kill `cat $PIDFILE`
jozee@2733 44 rm $PIDFILE
jozee@2733 45 sleep 2
jozee@2733 46 $DAEMON $OPTIONS
jozee@2733 47 status
jozee@2733 48 ;;
jozee@2733 49 *)
jozee@2733 50 echo ""
jozee@2733 51 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
jozee@2733 52 echo ""
jozee@2733 53 exit 1
jozee@2733 54 ;;
jozee@2733 55 esac
jozee@2733 56
jozee@2733 57 exit 0