3 # Startup script for the Shibboleth Service Provider Daemon
6 # description: Shibboleth 2 Service Provider Daemon
8 # pidfile: @-PKGRUNDIR-@/shibd.pid
9 # config: @-PKGSYSCONFDIR-@/shibboleth2.xml
11 # Source function library.
12 . /etc/rc.d/init.d/functions
13 shibd="@-PREFIX-@/sbin/shibd"
16 pidfile=@-PKGRUNDIR-@/shibd.pid
17 lockfile=/var/lock/subsys/$prog
19 [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
22 echo -n $"Starting $prog: "
23 if [ -f $lockfile ] ; then
24 if [ -f $pidfile ]; then
26 if checkpid $kpid 2>&1; then
27 echo "process already running"
30 echo "lock file found but no process running for pid $kpid, continuing"
35 export SHIBD_PID=$pidfile
37 chown $SHIBD_USER:$SHIBD_USER $pidfile
38 if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
39 /sbin/restorecon $pidfile
41 # Handle transition from root to non-root packages.
42 chown $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@/* 2>/dev/null || :
43 daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30
47 [ $RETVAL -eq 0 ] && touch $lockfile
52 echo -n $"Stopping $prog: "
57 [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
76 # run checks to determine if the service is running or use generic status
81 rh_status >/dev/null 2>&1
106 condrestart|try-restart)
107 rh_status_q || exit 0
111 echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"