1 #!/usr/bin/pagsh.openafs
4 # This script should go in /etc/init.d/ on Debian Linux systems
5 # running Domtool slaves.
7 # This script is NOT lsb compliant by a long shot... need to fix that
8 # We need nscd running to lookup afs users for whatever reason
11 # Provides: domtool-slave
12 # Required-Start: $remote_fs $network $time openafs-client nscd
13 # Required-Stop: $remote_fs $network openafs-client nscd
14 # Default-Start: 2 3 4 5
16 # Short-Description: Domtool Slave
17 # Description: Launches the domtool slave
20 SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
21 PIDFILE="/var/run/domtool/k5start-slave.pid"
23 . /lib/lsb/init-functions
27 echo -n "Starting Domtool slave: domtool-slave"
28 if sudo -u domtool domtool-admin-sudo slave-ping; then
29 echo "...already running."
31 PIDDIR=$(dirname "$PIDFILE")
32 if test ! -d "$PIDDIR"; then
34 chown domtool:nogroup $PIDDIR
37 start-stop-daemon --start --pidfile $PIDFILE \
39 --exec /usr/bin/k5start -- -U -b \
40 -f /etc/keytabs/domtool \
41 -K 300 -t -p $PIDFILE \
42 /usr/local/bin/domtool-slave-logged
48 echo -n "Stopping Domtool slave: domtool-slave"
49 if sudo -u domtool domtool-admin-sudo slave-shutdown; then
52 start-stop-daemon --stop --pidfile $PIDFILE
58 restart|reload|force-reload)
59 set +e; $SELF stop; set -e
64 if sudo -u domtool domtool-admin-sudo slave-ping; then
65 echo "Domtool slave is running."
67 echo "Domtool slave is stopped."
73 echo "Usage: $SELF start|stop|restart|reload|force-reload|status"