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
54 if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
55 /sbin/restorecon $pidfile
57 # Handle transition from root to non-root packages.
58 chown -R $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@ 2>/dev/null || :
59 daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30
63 [ $RETVAL -eq 0 ] && touch $lockfile
68 echo -n $"Stopping $prog: "
73 [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
92 # run checks to determine if the service is running or use generic status
97 rh_status >/dev/null 2>&1
102 rh_status_q && exit 0
106 rh_status_q || exit 0
113 rh_status_q || exit 7
122 condrestart|try-restart)
123 rh_status_q || exit 0
127 echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"