x
[heimdal.git] / packages / debian / heimdal-kdc.init
blob68be9de488c49b50b979b769a8315aa4fcce8419
1 #! /bin/sh
3 # skeleton example file to build /etc/init.d/ scripts.
4 # This file should be used to construct scripts for /etc/init.d.
6 # Written by Miquel van Smoorenburg <miquels@cistron.nl>.
7 # Modified for Debian GNU/Linux
8 # by Ian Murdock <imurdock@gnu.ai.mit.edu>.
10 # Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl
12 # This file was automatically customized by dh-make on Wed, 8 Dec 1999 11:54:13 +1100
14 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15 KDC_DAEMON=/usr/lib/heimdal-servers/kdc
16 KDC_NAME=heimdal-kdc
17 KDC_DESC="Heimdal KDC"
18 KPASSWDD_DAEMON=/usr/lib/heimdal-servers/kpasswdd
19 KPASSWDD_NAME=kpasswdd
20 KPASSWDD_DESC="Heimdal password server"
22 . /etc/default/heimdal-kdc
24 test -f $KDC_DAEMON || exit 0
25 test -f $KPASSWDD_DAEMON || exit 0
27 set -e
29 case "$1" in
30 start)
31 if [ "$KDC_ENABLED" = "yes" ];
32 then
33 echo -n "Starting $KDC_DESC: "
34 start-stop-daemon --start --quiet --background \
35 --make-pidfile --pidfile /var/run/$KDC_NAME.pid \
36 --exec $KDC_DAEMON -- $KDC_PARAMS
37 echo "$KDC_NAME."
39 if [ "$KPASSWDD_ENABLED" = "yes" ];
40 then
41 echo -n "Starting $KPASSWDD_DESC: "
42 start-stop-daemon --start --quiet --background \
43 --make-pidfile --pidfile /var/run/$KPASSWDD_NAME.pid \
44 --exec $KPASSWDD_DAEMON -- $KPASSWDD_PARAMS
45 echo "$KPASSWDD_NAME."
47 if [ "$MASTER_ENABLED" = "yes" ];
48 then
49 echo -n "Starting incremental propagation master: "
50 start-stop-daemon --start --quiet --background \
51 --make-pidfile --pidfile /var/run/ipropd-master.pid \
52 --exec /usr/sbin/ipropd-master -- $MASTER_PARAMS
53 echo "ipropd-master."
55 if [ "$SLAVE_ENABLED" = "yes" ];
56 then
57 echo -n "Starting incremental propagation slave: "
58 start-stop-daemon --start --quiet --background \
59 --make-pidfile --pidfile /var/run/ipropd-slave.pid \
60 --exec /usr/sbin/ipropd-slave -- $SLAVE_PARAMS
61 echo "ipropd-slave."
64 stop)
65 if [ -f /var/run/$KPASSWDD_NAME.pid ]
66 then
67 echo -n "Stopping $KPASSWDD_DESC: "
68 start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/$KPASSWDD_NAME.pid \
69 --exec $KPASSWDD_DAEMON -- $KPASSWDD_PARAMS
70 echo "$KPASSWDD_NAME."
72 if [ -f /var/run/$KDC_NAME.pid ]
73 then
74 echo -n "Stopping $KDC_DESC: "
75 start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/$KDC_NAME.pid \
76 --exec $KDC_DAEMON -- $KDC_PARAMS
77 echo "$KDC_NAME."
79 if [ -f /var/run/ipropd-master.pid ]
80 then
81 echo -n "Stopping incremental propagation master: "
82 start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/ipropd-master.pid \
83 --exec /usr/sbin/ipropd-master -- $MASTER_PARAMS
84 echo "ipropd-master."
86 if [ -f /var/run/ipropd-slave.pid ]
87 then
88 echo -n "Stopping incremental propagation slave: "
89 start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/ipropd-slave.pid \
90 --exec /usr/sbin/ipropd-slave -- $SLAVE_PARAMS
91 echo "/usr/sbin/ipropd-slave."
94 #reload)
96 # If the daemon can reload its config files on the fly
97 # for example by sending it SIGHUP, do it here.
99 # If the daemon responds to changes in its config file
100 # directly anyway, make this a do-nothing entry.
102 # echo "Reloading $DESC configuration files."
103 # start-stop-daemon --stop --signal 1 --quiet --pidfile \
104 # /var/run/$NAME.pid --exec $DAEMON
106 restart|force-reload)
108 # If the "reload" option is implemented, move the "force-reload"
109 # option to the "reload" entry above. If not, "force-reload" is
110 # just the same as "restart".
112 /etc/init.d/heimdal-kdc stop
113 sleep 1
114 /etc/init.d/heimdal-kdc start
117 N=/etc/init.d/$NAME
118 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
119 echo "Usage: $N {start|stop|restart|force-reload}" >&2
120 exit 1
122 esac
124 exit 0