4 # Required-Start: $local_fs $remote_fs $network
\r
5 # Required-Stop: $local_fs $remote_fs $network
\r
6 # Default-Start: 2 3 4 5
\r
7 # Default-Stop: S 0 1 6
\r
8 # Short-Description: Shibboleth 2 Service Provider Daemon
\r
9 # Description: Starts the separate daemon used by the Shibboleth
\r
10 # Apache module to manage sessions and to retrieve
\r
11 # attributes from Shibboleth Identity Providers.
\r
14 # Written by Quanah Gibson-Mount <quanah@stanford.edu>
\r
15 # Modified by Lukas Haemmerle <lukas.haemmerle@switch.ch> for Shibboleth 2
\r
16 # Based on the dh-make template written by:
\r
18 # Written by Miquel van Smoorenburg <miquels@cistron.nl>.
\r
19 # Modified for Debian
\r
20 # by Ian Murdock <imurdock@gnu.ai.mit.edu>.
\r
22 PATH=/sbin:/bin:/usr/sbin:/usr/bin
\r
23 DESC="Shibboleth 2 daemon"
\r
25 SHIB_HOME=/opt/shibboleth-sp
\r
26 SHIB_ETC=$SHIB_HOME/etc/shibboleth
\r
27 SHIBSP_CONFIG=$SHIB_ETC/shibboleth2.xml
\r
28 LD_LIBRARY_PATH=$SHIB_HOME/lib
\r
29 DAEMON=$SHIB_HOME/sbin/$NAME
\r
30 SCRIPTNAME=/etc/init.d/$NAME
\r
31 PIDFILE=/var/run/$NAME.pid
\r
34 # Force removal of socket
\r
35 DAEMON_OPTS="$DAEMON_OPTS -f"
\r
37 # Use defined configuration file
\r
38 DAEMON_OPTS="$DAEMON_OPTS -c $SHIBSP_CONFIG"
\r
40 # Specify pid file to use
\r
41 DAEMON_OPTS="$DAEMON_OPTS -p $PIDFILE"
\r
43 # Exit if the package is not installed.
\r
44 [ -x "$DAEMON" ] || exit 0
\r
46 # Read configuration if it is present.
\r
47 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
\r
49 # Get the setting of VERBOSE and other rcS variables.
\r
50 [ -f /etc/default/rcS ] && . /etc/default/rcS
\r
54 # Don't start shibd if NO_START is set.
\r
55 if [ "$NO_START" = 1 ] ; then
\r
56 echo "Not starting $DESC (see /etc/default/$NAME)"
\r
59 echo -n "Starting $DESC: "
\r
60 start-stop-daemon --background --start --quiet \
\r
61 --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
\r
65 echo -n "Stopping $DESC: "
\r
66 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
\r
70 restart|force-reload)
\r
71 echo -n "Restarting $DESC: "
\r
72 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
\r
75 start-stop-daemon --background --start --quiet \
\r
76 --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
\r
80 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
\r