1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-15 11:04:16 +01:00
Files
wicd/data/init/pld/wicd
gryf 3499631070 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.
2020-08-25 21:26:34 +02:00

89 lines
1.4 KiB
Bash
Executable File

#!/bin/sh
#
# wicd wicd wireless connection daemon
#
# chkconfig: 345 99 01
#
# description: wicd wireless connection daemon
#
# processname: wicd
# config:
# pidfile: /var/run/wicd/wicd.pid
#
# $Id: template.init 9689 2008-03-27 16:15:39Z patrys $
# Source function library
. /etc/rc.d/init.d/functions
# Get service config - may override defaults
# [ -f /etc/sysconfig/wicd ] && . /etc/sysconfig/wicd
WICD_BIN=/usr/sbin/wicd
start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/wicd ]; then
msg_starting wicd
daemon $WICD_BIN
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/wicd
else
msg_already_running wicd
fi
}
stop() {
if [ -f /var/lock/subsys/wicd ]; then
# Stop daemons.
msg_stopping wicd
# killproc wicd
killproc --pidfile /var/run/wicd.pid wicd -TERM
rm -f /var/lock/subsys/wicd
else
msg_not_running wicd
fi
}
condrestart() {
if [ -f /var/lock/subsys/wicd ]; then
stop
start
else
msg_not_running wicd
RETVAL=$1
fi
}
RETVAL=0
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
try-restart)
condrestart 0
;;
# use this one if program doesn't support reloading without restart
force-reload)
condrestart 7
;;
status)
status wicd
RETVAL=$?
;;
*)
msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
exit 3
esac
exit $RETVAL