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"
29 pidfile=@-PKGRUNDIR-@/shibd.pid
30 lockfile=/var/lock/subsys/$prog
32 [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
35 echo -n $"Starting $prog: "
36 if [ -f $lockfile ] ; then
37 if [ -f $pidfile ]; then
39 if checkpid $kpid 2>&1; then
40 echo "process already running"
43 echo "lock file found but no process running for pid $kpid, continuing"
48 # Make sure package run directory exists.
49 [ -d @-PKGRUNDIR-@ ] || mkdir @-PKGRUNDIR-@
51 export SHIBD_PID=$pidfile
53 chown $SHIBD_USER:$SHIBD_USER $pidfile
55 # Handle transition from root to non-root packages.
56 chown -R $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@ @-PKGCACHEDIR-@ 2>/dev/null || :
57 daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30
59 # Adjust native logging directory permission so log roll-over works
60 chown apache:apache @-SHIRELOGDIR-@
64 [ $RETVAL -eq 0 ] && touch $lockfile
69 echo -n $"Stopping $prog: "
74 [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
93 # run checks to determine if the service is running or use generic status
98 rh_status >/dev/null 2>&1
103 rh_status_q && exit 0
107 rh_status_q || exit 0
114 rh_status_q || exit 7
123 condrestart|try-restart)
124 rh_status_q || exit 0
128 echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"