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
+77
@@ -0,0 +1,77 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# /etc/init.d/wicd
|
||||
#
|
||||
# chkconfig: - 98 02
|
||||
# description: Wicd is a wireless and wired network manager for Linux.
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
|
||||
WICD_BIN=/usr/sbin/wicd
|
||||
|
||||
pidfile=/var/run/wicd/wicd.pid
|
||||
servicename=wicd
|
||||
processname=wicd
|
||||
start()
|
||||
{
|
||||
echo -n "Starting wicd service: "
|
||||
daemon $WICD_BIN 2> /dev/null
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ "$RETVAL" = "0" ] && touch /var/lock/subsys/$servicename
|
||||
}
|
||||
stop()
|
||||
{
|
||||
echo -n "Stopping wicd service and closing connections: "
|
||||
$WICD_BIN -k
|
||||
RETVAL=$?
|
||||
if [ $RETVAL -eq 0 ]; then
|
||||
echo_success
|
||||
rm -f /var/lock/subsys/$servicename
|
||||
rm -f $pidfile
|
||||
else
|
||||
echo_failure
|
||||
fi
|
||||
echo
|
||||
}
|
||||
|
||||
force_stop()
|
||||
{
|
||||
echo -n "Stopping wicd service: "
|
||||
killproc -p $pidfile wicd
|
||||
RETVAL=$?
|
||||
echo
|
||||
if [ $RETVAL -eq 0 ]; then
|
||||
rm -f /var/lock/subsys/$servicename
|
||||
rm -f $pidfile
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
force_stop)
|
||||
force_stop
|
||||
;;
|
||||
status)
|
||||
status -p $pidfile $processname
|
||||
RETVAL=$?
|
||||
;;
|
||||
restart | reload)
|
||||
force_stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: wicd {start|stop|force_stop|status|reload|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit $RETVAL
|
||||
|
||||
Reference in new issue
Block a user