# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
-# Default-Stop: S 0 1 6
+# Default-Stop: 0 1 6
# Short-Description: Shibboleth 2 Service Provider Daemon
# Description: Starts the separate daemon used by the Shibboleth
# Apache module to manage sessions and to retrieve
NAME=shibd
SHIB_HOME=@-PREFIX-@
SHIBSP_CONFIG=@-PKGSYSCONFDIR-@/shibboleth2.xml
+SHIBD_WAIT=30
LD_LIBRARY_PATH=@-PREFIX-@/lib
DAEMON=@-PREFIX-@/sbin/$NAME
SCRIPTNAME=/etc/init.d/$NAME
PIDFILE=@-PKGRUNDIR-@/$NAME.pid
DAEMON_OPTS=""
+# Read configuration if it is present.
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
# Force removal of socket
DAEMON_OPTS="$DAEMON_OPTS -f"
# Specify pid file to use
DAEMON_OPTS="$DAEMON_OPTS -p $PIDFILE"
+# Specify wait time to use
+DAEMON_OPTS="$DAEMON_OPTS -w $SHIBD_WAIT"
+
# Exit if the package is not installed.
[ -x "$DAEMON" ] || exit 0
-# Read configuration if it is present.
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
# Get the setting of VERBOSE and other rcS variables.
[ -f /etc/default/rcS ] && . /etc/default/rcS
exit 0
fi
echo -n "Starting $DESC: "
- start-stop-daemon --background --start --quiet \
+ start-stop-daemon --start --quiet \
--pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--exec $DAEMON
sleep 1
- start-stop-daemon --background --start --quiet \
+ start-stop-daemon --start --quiet \
--pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;