#!/usr/bin/pagsh.openafs
-# This script should go in /etc/init.d/ on Debian Linux systems running Domtool dispatchers.
+# This script should go in /etc/init.d/ on Debian Linux systems
+# running Domtool dispatchers.
SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
-PIDFILE="/var/run/k5start-domtool-server.pid"
+PIDFILE="/var/run/domtool/k5start-server.pid"
set -e
if sudo -u domtool domtool-admin-sudo ping; then
echo "...already running."
else
+ PIDDIR=$(dirname "$PIDFILE")
+ if test ! -d "$PIDDIR"; then
+ mkdir -m 0755 $PIDDIR
+ chown domtool:domtool $PIDDIR
+ fi
+
start-stop-daemon --start --pidfile $PIDFILE \
-c domtool:domtool \
--exec /usr/bin/k5start -- -U -b \