]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/debian/zephyr-server-krb.init
resurrect zephyr packaging
[1ts-debian.git] / zephyr / debian / zephyr-server-krb.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         if test ! -f /etc/zephyr/srvtab
26         then
27                 echo 'You need to get a srvtab before the kerberized zephyr server will function'
28                 echo 'correctly.  Get a srvtab for zephyr/zephyr and put it in /etc/zephyr/srvtab.'
29                 exit 0
30         fi
31         echo -n "Starting $DESC: "
32         start-stop-daemon --start --quiet --exec $DAEMON
33         echo "$NAME."
34         ;;
35   stop)
36         echo -n "Stopping $DESC: "
37         start-stop-daemon --oknodo --stop --quiet --exec $DAEMON
38         echo "$NAME."
39         ;;
40   restart)
41         #
42         #       If the "reload" option is implemented, move the "force-reload"
43         #       option to the "reload" entry above. If not, "force-reload" is
44         #       just the same as "restart".
45         #
46         echo -n "Restarting $DESC: "
47         start-stop-daemon --oknodo --stop --quiet --exec $DAEMON
48         sleep 1
49         start-stop-daemon --start --quiet --pidfile \
50                 /var/run/$NAME.pid --exec $DAEMON -- $zhm_args
51         echo "$NAME."
52         ;;
53   reload|force-reload)
54         echo -n "Telling $NAME to reload..."
55         start-stop-daemon --stop --signal HUP --exec $DAEMON
56         echo done.
57         ;;
58   *)
59         N=/etc/init.d/$NAME
60         echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
61         # echo "Usage: $N {start|stop|restart|force-reload}" >&2
62         exit 1
63         ;;
64 esac
65
66 exit 0
67
68 ### BEGIN INIT INFO
69 # Provides:          zephyrd
70 # Required-Start:    $syslog $network
71 # Required-Stop:     $syslog
72 # Should-Stop:       $network
73 # Default-Start:     2 3 4 5
74 # Default-Stop:      0 1 6
75 # Short-Description: Start the zephyr server.
76 # Description:       Start the zephyr server.
77 ### END INIT INFO