mirror of
https://github.com/gryf/wicd.git
synced 2026-02-21 17:35:46 +01:00
update the Arch init script to use the -k switch
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
. /etc/rc.conf
|
. /etc/rc.conf
|
||||||
. /etc/rc.d/functions
|
. /etc/rc.d/functions
|
||||||
|
|
||||||
WICD_BIN=%SBIN%wicd
|
WICD_BIN="%SBIN%wicd"
|
||||||
|
|
||||||
if [ -f /var/run/wicd/wicd.pid ]; then
|
if [ -f /var/run/wicd/wicd.pid ]; then
|
||||||
PID="$(cat /var/run/wicd/wicd.pid)"
|
PID="$(cat /var/run/wicd/wicd.pid)"
|
||||||
@@ -25,6 +25,17 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
stat_busy "Stopping wicd Daemon"
|
||||||
|
$WICD_BIN -k
|
||||||
|
if [ $? -gt 0 ]; then
|
||||||
|
stat_fail
|
||||||
|
else
|
||||||
|
rm_daemon wicd
|
||||||
|
stat_done
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
force_stop)
|
||||||
stat_busy "Stopping wicd Daemon"
|
stat_busy "Stopping wicd Daemon"
|
||||||
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
@@ -35,12 +46,12 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
$0 stop
|
$0 force_stop
|
||||||
sleep 1
|
sleep 1
|
||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "usage: $0 {start|stop|restart}"
|
echo "usage: $0 {start|force_stop|stop|restart}"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user