]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - crypto/heimdal/packages/debian/heimdal-kcm.init
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / crypto / heimdal / packages / debian / heimdal-kcm.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 Wed,  8 Dec 1999 11:54:13 +1100
13
14 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15 KCM_DAEMON="/usr/sbin/kcm"
16 KCM_NAME="kcm"
17 KCM_DESC="Heimdal KCM"
18 KCM_PARAMS="--detach"
19
20 test -f $KCM_DAEMON || exit 0
21
22 set -e
23
24 case "$1" in
25   start)
26         echo -n "Starting $KCM_DESC: "
27         start-stop-daemon --start --quiet \
28                 --pidfile /var/run/$KCM_NAME.pid \
29                 --exec $KCM_DAEMON -- $KCM_PARAMS
30         echo "$KCM_NAME."
31         ;;
32   stop)
33         echo -n "Stopping $KCM_DESC: "
34         start-stop-daemon --stop --oknodo --quiet \
35                 --pidfile /var/run/$KCM_NAME.pid \
36                 --exec $KCM_DAEMON -- $KCM_PARAMS
37         echo "$KCM_NAME."
38         ;;
39   #reload)
40         #
41         #       If the daemon can reload its config files on the fly
42         #       for example by sending it SIGHUP, do it here.
43         #
44         #       If the daemon responds to changes in its config file
45         #       directly anyway, make this a do-nothing entry.
46         #
47         # echo "Reloading $DESC configuration files."
48         # start-stop-daemon --stop --signal 1 --quiet --pidfile \
49         #       /var/run/$NAME.pid --exec $DAEMON
50   #;;
51   restart|force-reload)
52         #
53         #       If the "reload" option is implemented, move the "force-reload"
54         #       option to the "reload" entry above. If not, "force-reload" is
55         #       just the same as "restart".
56         #
57         /etc/init.d/heimdal-kcm stop
58         sleep 1
59         /etc/init.d/heimdal-kcm start
60         ;;
61   *)
62         N=/etc/init.d/$NAME
63         # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
64         echo "Usage: $N {start|stop|restart|force-reload}" >&2
65         exit 1
66         ;;
67 esac
68
69 exit 0