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