3 # shibd Shibboleth Service Provider Daemon
6 # description: Shibboleth 2 Service Provider Daemon
8 # pidfile: @-PKGRUNDIR-@/shibd.pid
9 # config: @-PKGSYSCONFDIR-@/shibboleth2.xml
13 # Required-Start: $local_fs $remote_fs $network
16 # Required-Stop: $local_fs $remote_fs $network
18 # Default-Stop: 0 1 2 6
19 # Short-Description: Shibboleth 2 Service Provider Daemon
20 # Description: Starts the separate daemon used by the Shibboleth Apache module to manage state and SAML interactions.
23 # Source function library.
24 . /etc/rc.d/init.d/functions
26 shibd="@-PREFIX-@/sbin/shibd"
31 pidfile=@-PKGRUNDIR-@/shibd.pid
32 lockfile=/var/lock/subsys/$prog
34 [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
39 echo -n $"Starting $prog: "
40 if [ -f $lockfile ] ; then
41 if [ -f $pidfile ]; then
43 if checkpid $kpid 2>&1; then
44 echo "process already running"
47 echo "lock file found but no process running for pid $kpid, continuing"
52 # Make sure package run directory exists.
53 [ -d @-PKGRUNDIR-@ ] || mkdir @-PKGRUNDIR-@
55 export SHIBD_PID=$pidfile
57 chown $SHIBD_USER:$SHIBD_USER $pidfile
59 # Handle transition from root to non-root packages.
60 chown -R $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@ @-PKGCACHEDIR-@ 2>/dev/null || :
61 daemon --user $SHIBD_USER $shibd -p $pidfile -f -w $SHIBD_WAIT
65 [ $RETVAL -eq 0 ] && touch $lockfile
70 echo -n $"Stopping $prog: "
75 [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
94 # run checks to determine if the service is running or use generic status
99 rh_status >/dev/null 2>&1
104 rh_status_q && exit 0
108 rh_status_q || exit 0
115 rh_status_q || exit 7
124 condrestart|try-restart)
125 rh_status_q || exit 0
129 echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"