f7bf60ca0550d4c65394f9eced8a7cc371db08bb
[svn42.git] / old-door-deamon / ledstats-0.3.1 / debian / init.d
1 #! /bin/sh
2 #
3 # skeleton      example file to build /etc/init.d/ scripts.
4 #               This file should be used to construct scripts for /etc/init.d.
5 #
6 #               Written by Miquel van Smoorenburg <miquels@cistron.nl>.
7 #               Modified for Debian GNU/Linux
8 #               by Ian Murdock <imurdock@gnu.ai.mit.edu>.
9 #
10 # Version:      @(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
11 #
12 # This file was automatically customized by dh-make on Wed, 13 Nov 2002 00:21:10 +0100
13
14 PATH=/sbin:/bin:/usr/sbin:/usr/bin
15 DAEMON=/usr/sbin/ledstats
16 NAME=ledstats
17 DESC=ledstats
18
19 test -f $DAEMON || exit 0
20
21 set -e
22
23 case "$1" in
24   start)
25         echo -n "Starting $DESC: $NAME"
26         start-stop-daemon --start --quiet  \
27                 --exec $DAEMON
28         echo "."
29         ;;
30   stop)
31         echo -n "Stopping $DESC: $NAME"
32         start-stop-daemon --oknodo --stop --quiet  \
33                 --exec $DAEMON
34         echo "."
35         ;;
36   #reload)
37         #
38         #       If the daemon can reload its config files on the fly
39         #       for example by sending it SIGHUP, do it here.
40         #
41         #       If the daemon responds to changes in its config file
42         #       directly anyway, make this a do-nothing entry.
43         #
44         # echo "Reloading $DESC configuration files."
45         # start-stop-daemon --stop --signal 1 --quiet --pidfile \
46         #       /var/run/$NAME.pid --exec $DAEMON
47   #;;
48   restart|force-reload)
49         #
50         #       If the "reload" option is implemented, move the "force-reload"
51         #       option to the "reload" entry above. If not, "force-reload" is
52         #       just the same as "restart".
53         #
54         echo -n "Restarting $DESC: $NAME"
55         start-stop-daemon --stop --quiet --exec $DAEMON
56         sleep 1
57         start-stop-daemon --start --quiet--exec $DAEMON
58         echo "."
59         ;;
60   *)
61         N=/etc/init.d/$NAME
62         # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
63         echo "Usage: $N {start|stop|restart|force-reload}" >&2
64         exit 1
65         ;;
66 esac
67
68 exit 0