wok annotate wicd/stuff/wicd @ rev 22130

updated wifidog (1.1.5 -> 1.3.0)
author Hans-G?nter Theisgen
date Mon Nov 04 11:16:52 2019 +0100 (2019-11-04)
parents 7f188676b59c
children
rev   line source
jozee@2733 1 #!/bin/sh
al@19161 2 # /etc/init.d/wicd: Start, stop and restart daemon 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
al@19159 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)
pascal@15577 19 if active_pidfile $PIDFILE wicd ; then
al@19159 20 _ '%s is already running.' $NAME
jozee@2733 21 exit 1
jozee@2733 22 fi
al@19159 23 action 'Starting %s: %s...' "$DESC" $NAME
al@19159 24 $DAEMON $OPTIONS
jozee@2733 25 status
jozee@2733 26 ;;
jozee@2733 27 stop)
pascal@15577 28 if ! active_pidfile $PIDFILE wicd ; then
al@19159 29 _ '%s is not running.' $NAME
jozee@2733 30 exit 1
jozee@2733 31 fi
al@19159 32 action 'Stopping %s: %s...' "$DESC" $NAME
al@19159 33 kill $(cat $PIDFILE)
mojo@14578 34 rm -f $PIDFILE
jozee@2733 35 status
jozee@2733 36 ;;
jozee@2733 37 restart)
pascal@15577 38 if ! active_pidfile $PIDFILE wicd ; then
al@19159 39 _ '%s is not running.' $NAME
jozee@2733 40 exit 1
jozee@2733 41 fi
al@19159 42 action 'Restarting %s: %s...' "$DESC" $NAME
al@19159 43 kill $(cat $PIDFILE)
mojo@14578 44 rm -f $PIDFILE
jozee@2733 45 sleep 2
jozee@2733 46 $DAEMON $OPTIONS
jozee@2733 47 status
jozee@2733 48 ;;
jozee@2733 49 *)
al@19159 50 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
al@19159 51 newline
jozee@2733 52 exit 1
jozee@2733 53 ;;
jozee@2733 54 esac
jozee@2733 55
jozee@2733 56 exit 0