1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-28 01:12:34 +01:00

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:
2020-08-25 20:38:00 +02:00
parent 9cefcee94b
commit 3499631070
11 changed files with 37 additions and 100 deletions

61
data/init/slackware/rc.wicd Executable file
View File

@@ -0,0 +1,61 @@
#!/bin/sh
# /etc/rc.d/rc.wicd
# Start/stop/restart the Wicd daemon
# This is defined in /usr/lib/python2.6/site-packages/wicd/wpath.py
PIDFILE="/var/run/wicd/wicd.pid"
DAEMON="/usr/sbin/wicd"
# Define start and stop functions
wicd_start() {
if [ -e $PIDFILE ]; then
echo "Wicd appears to already be running."
echo "If this is not the case, then remove "
echo "$PIDFILE and try again..."
exit 1
else
echo "Starting wicd daemon: $DAEMON &"
wicd 2>/dev/null 1>&2 &
fi
}
wicd_force_stop() {
echo "Stopping wicd daemon..."
if [ -e $PIDFILE ]; then
kill $(cat $PIDFILE) 2>/dev/null
rm -f $PIDFILE 2>/dev/null
else
pkill -f python.*wicd-daemon.py 2>/dev/null
fi
}
wicd_stop() {
echo "Stopping wicd daemon and closing connections..."
$DAEMON -k
}
# See how we were called and take appropriate action
case $1 in
start)
wicd_start
;;
stop)
wicd_stop
;;
force_stop)
wicd_force_stop
;;
restart)
wicd_force_stop
wicd_start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac