Moved from generated init files to static.
Let the maintainers do their choices, instead of jump into ideas about how init files should looks like. Adjusted gitignore file.
This commit is contained in:
1 parent
9cefcee94b
commit
3499631070
11 files changed
+37
-100
No files matched your search
Executable
+58
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Arch init script for wicd
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
WICD_BIN="/usr/sbin/wicd"
|
||||
|
||||
if [ -f /var/run/wicd/wicd.pid ]; then
|
||||
PID="$(cat /var/run/wicd/wicd.pid)"
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting wicd Daemon"
|
||||
if [ -z "$PID" ]; then
|
||||
$WICD_BIN &> /dev/null
|
||||
fi
|
||||
if [ ! -z "$PID" -o $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
add_daemon wicd
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
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"
|
||||
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
rm_daemon wicd
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 force_stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|force_stop|stop|restart}"
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in new issue
Block a user