]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/debian/zephyr-clients.init
resurrect zephyr packaging
[1ts-debian.git] / zephyr / debian / zephyr-clients.init
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 Mon,  4 Dec 2000 05:28:22 -0500
13
14 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15 DAEMON=/usr/sbin/zhm
16 NAME=zhm
17 DESC="zephyr host manager"
18
19 test -f $DAEMON || exit 0
20
21 set -e
22
23 if test -f /etc/default/zephyr-clients
24 then
25         . /etc/default/zephyr-clients
26 fi
27
28 case "$1" in
29   start)
30         echo -n "Starting $DESC: "
31         start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
32                 --exec $DAEMON -- $zhm_args
33         echo "$NAME."
34         ;;
35   stop)
36         echo -n "Stopping $DESC: "
37         start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
38                 --name $NAME
39         echo "$NAME."-
40         ;;
41   restart|force-reload)
42         #
43         #       If the "reload" option is implemented, move the "force-reload"
44         #       option to the "reload" entry above. If not, "force-reload" is
45         #       just the same as "restart".
46         #
47         echo -n "Restarting $DESC: "
48         start-stop-daemon --oknodo --stop --retry 5 --quiet --pidfile \
49                 /var/run/$NAME.pid --name $NAME
50         start-stop-daemon --start --quiet --pidfile \
51                 /var/run/$NAME.pid --exec $DAEMON -- -N $zhm_args
52         echo "$NAME."
53         ;;
54   *)
55         N=/etc/init.d/$NAME
56         # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
57         echo "Usage: $N {start|stop|restart|force-reload}" >&2
58         exit 1
59         ;;
60 esac
61
62 exit 0
63
64 ### BEGIN INIT INFO
65 # Provides:          zhm
66 # Required-Start:    $syslog $network
67 # Required-Stop:     $syslog
68 # Should-Stop:       $network
69 # Default-Start:     2 3 4 5
70 # Default-Stop:      0 1 6
71 # Short-Description: Start the zephyr host manager daemon.
72 # Description:       Start the zephyr host manager daemon.
73 ### END INIT INFO
74