X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/cf1be826ae357936594618d1a580d4b26e92493f..83801e650741bf2800ff371dad9a30f731f84571:/scripts/domtool-server diff --git a/scripts/domtool-server b/scripts/domtool-server index da7282a..94ffda3 100755 --- a/scripts/domtool-server +++ b/scripts/domtool-server @@ -1,24 +1,44 @@ -#!/usr/bin/pagsh.openafs +#!/bin/sh +# -*- sh -*- -# 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. + +# This script is NOT lsb compliant by a long shot... need to fix that + +### BEGIN INIT INFO +# Provides: domtool-server +# Required-Start: $remote_fs $network $time openafs-client nscd +# Required-Stop: $remote_fs $network openafs-client nscd +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Domtool Dispatcher +# Description: Launches the domtool server +### END INIT INFO SELF=$(cd $(dirname $0); pwd -P)/$(basename $0) -PIDFILE="/var/run/k5start-domtool-server.pid" +PIDFILE="/var/run/domtool/k5start-server.pid" -set -e +. /lib/lsb/init-functions case $1 in start) - echo -n "Starting Domtool dispatcher: domtool-server" + log_daemon_msg "Starting Domtool dispatcher" "domtool-server" if sudo -u domtool domtool-admin-sudo ping; then echo "...already running." else + PIDDIR=$(dirname "$PIDFILE") + if test ! -d "$PIDDIR"; then + mkdir -m 0750 $PIDDIR + chown domtool:nogroup $PIDDIR + fi + start-stop-daemon --start --pidfile $PIDFILE \ - -c domtool:domtool \ + -c domtool:nogroup \ --exec /usr/bin/k5start -- -U -b \ -f /etc/keytabs/domtool \ -K 300 -t -p $PIDFILE \ - domtool-server-logged + /usr/local/bin/domtool-server-logged echo "." fi ;;