Debian Codegraph @

debian/heimdal-kcm.init

raw
1 #! /bin/sh
2 ### BEGIN INIT INFO
3 # Provides: heimdal-kcm
4 # Required-Start: $remote_fs $syslog
5 # Required-Stop: $remote_fs $syslog
6 # Default-Start: 2 3 4 5
7 # Default-Stop: 0 1 6
8 # Short-Description: Start KCM server
9 ### END INIT INFO
10
11 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
12 KCM_DAEMON="/usr/sbin/kcm"
13 KCM_NAME="kcm"
14 KCM_DESC="Heimdal KCM"
15 KCM_PARAMS="--detach"
16
17 test -f $KCM_DAEMON || exit 0
18
19 # Load the VERBOSE setting and other rcS variables
20 . /lib/init/vars.sh
21
22 # Define LSB log_* functions.
23 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
24 . /lib/lsb/init-functions
25
26 set -e
27
28 case "$1" in
29 start)
30 echo -n "Starting $KCM_DESC: "
31 start-stop-daemon --start --quiet \
32 --pidfile /var/run/$KCM_NAME.pid \
33 --exec $KCM_DAEMON -- $KCM_PARAMS
34 echo "$KCM_NAME."
35 ;;
36 stop)
37 echo -n "Stopping $KCM_DESC: "
38 start-stop-daemon --stop --oknodo --quiet \
39 --pidfile /var/run/$KCM_NAME.pid \
40 --exec $KCM_DAEMON -- $KCM_PARAMS
41 echo "$KCM_NAME."
42 ;;
43 #reload)
44 #
45 # If the daemon can reload its config files on the fly
46 # for example by sending it SIGHUP, do it here.
47 #
48 # If the daemon responds to changes in its config file
49 # directly anyway, make this a do-nothing entry.
50 #
51 # echo "Reloading $DESC configuration files."
52 # start-stop-daemon --stop --signal 1 --quiet --pidfile \
53 # /var/run/$NAME.pid --exec $DAEMON
54 #;;
55 restart|force-reload)
56 #
57 # If the "reload" option is implemented, move the "force-reload"
58 # option to the "reload" entry above. If not, "force-reload" is
59 # just the same as "restart".
60 #
61 /etc/init.d/heimdal-kcm stop
62 sleep 1
63 /etc/init.d/heimdal-kcm start
64 ;;
65 *)
66 N=/etc/init.d/$NAME
67 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
68 echo "Usage: $N {start|stop|restart|force-reload}" >&2
69 exit 1
70 ;;
71 esac
72
73 exit 0