3
# skeleton example file to build /etc/init.d/ scripts.
4
# This file should be used to construct scripts for /etc/init.d.
6
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
7
# Modified for Debian GNU/Linux
8
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
10
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
13
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
14
DAEMON=/usr/sbin/monopd
18
test -x $DAEMON || exit 0
24
echo -n "Starting $DESC: "
25
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
26
--background --make-pidfile --exec \
27
/bin/su nobody -- -c $DAEMON
31
echo -n "Stopping $DESC: "
32
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
33
--oknodo --exec $DAEMON
34
rm -f /var/run/$NAME.pid
39
# If the daemon can reload its config files on the fly
40
# for example by sending it SIGHUP, do it here.
42
# If the daemon responds to changes in its config file
43
# directly anyway, make this a do-nothing entry.
45
# echo "Reloading $DESC configuration files."
46
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
47
# /var/run/$NAME.pid --exec $DAEMON
51
# If the "reload" option is implemented, move the "force-reload"
52
# option to the "reload" entry above. If not, "force-reload" is
53
# just the same as "restart".
55
echo -n "Restarting $DESC: "
56
start-stop-daemon --stop --quiet --pidfile \
57
/var/run/$NAME.pid --oknodo --exec $DAEMON
58
rm -f /var/run/$NAME.pid
60
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
61
--background --make-pidfile --exec \
62
/bin/su nobody -- -c $DAEMON
67
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
68
echo "Usage: $N {start|stop|restart|force-reload}" >&2