1 #!/usr/bin/pagsh.openafs
4 # This script should go in /etc/init.d/ on Debian Linux systems
5 # running Domtool dispatchers.
7 # This script is NOT lsb compliant by a long shot... need to fix that
10 # Provides: domtool-server
11 # Required-Start: $remote_fs $network $time openafs-client nscd
12 # Required-Stop: $remote_fs $network openafs-client nscd
13 # Default-Start: 2 3 4 5
15 # Short-Description: Domtool Dispatcher
16 # Description: Launches the domtool server
19 SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
20 PIDFILE="/var/run/domtool/k5start-server.pid"
22 . /lib/lsb/init-functions
26 log_daemon_msg "Starting Domtool dispatcher" "domtool-server"
27 if sudo -u domtool domtool-admin-sudo ping; then
28 echo "...already running."
30 PIDDIR=$(dirname "$PIDFILE")
31 if test ! -d "$PIDDIR"; then
33 chown domtool:nogroup $PIDDIR
36 start-stop-daemon --start --pidfile $PIDFILE \
38 --exec /usr/bin/k5start -- -U -b \
39 -f /etc/keytabs/domtool \
40 -K 300 -t -p $PIDFILE \
41 /usr/local/bin/domtool-server-logged
47 echo -n "Stopping Domtool dispatcher: domtool-server"
48 if sudo -u domtool domtool-admin-sudo shutdown; then
51 start-stop-daemon --stop --pidfile $PIDFILE
57 restart|reload|force-reload)
58 set +e; $SELF stop; set -e
63 if sudo -u domtool domtool-admin-sudo ping; then
64 echo "Domtool dispatcher is running."
66 echo "Domtool dispatcher is stopped."
72 echo "Usage: $SELF start|stop|restart|reload|force-reload|status"