]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - debian/zephyr-clients.init
293d7be66ce8837510ee6bf318ea2b9c4d3bc1f7
[1ts-debian.git] / 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                 --exec $DAEMON
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 --quiet --pidfile \
49                 /var/run/$NAME.pid --exec $DAEMON
50         sleep 1
51         start-stop-daemon --start --quiet --pidfile \
52                 /var/run/$NAME.pid --exec $DAEMON -- $zhm_args
53         echo "$NAME."
54         ;;
55   *)
56         N=/etc/init.d/$NAME
57         # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
58         echo "Usage: $N {start|stop|restart|force-reload}" >&2
59         exit 1
60         ;;
61 esac
62
63 exit 0