Use shibboleth-sp as package name for compatibility.
[shibboleth/cpp-sp.git] / configs / shibd-debian.in
index 99ff4d1..37efca4 100644 (file)
@@ -4,7 +4,7 @@
 # Required-Start: $local_fs $remote_fs $network
 # Required-Stop: $local_fs $remote_fs $network
 # Default-Start: 2 3 4 5
-# Default-Stop: 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
@@ -24,12 +24,16 @@ DESC="Shibboleth 2 daemon"
 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"
 
@@ -39,12 +43,12 @@ DAEMON_OPTS="$DAEMON_OPTS -c $SHIBSP_CONFIG"
 # 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
 
@@ -56,7 +60,7 @@ start)
         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."
     ;;
@@ -71,7 +75,7 @@ restart|force-reload)
     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."
     ;;