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"
15 pidfile=@-PKGRUNDIR-@/shibd.pid
17 #VER=`cat /etc/redhat-release | awk '{print $3}' | awk -F . '{print $1}'`
20 if [ -f /etc/sysconfig/shibd ] ; then
21 . /etc/sysconfig/shibd
25 echo -n $"Starting $prog: "
26 if [ -f /var/lock/subsys/shibd ] ; then
27 if [ -f $pidfile ]; then
29 if checkpid $kpid 2>&1; then
30 echo "process already running"
33 echo "lock file found but no process running for pid $kpid, continuing"
38 #_RHEL6_ export LD_LIBRARY_PATH=/opt/shibboleth/lib:$LD_LIBRARY_PATH
39 export SHIBD_PID=$pidfile
41 chown $SHIBD_USER:$SHIBD_USER $pidfile
42 if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
43 /sbin/restorecon $pidfile
45 # Handle transition from root to non-root packages.
46 chown $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@/*
47 daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30
51 [ $RETVAL = 0 ] && touch /var/lock/subsys/shibd
56 echo -n $"Stopping $prog: "
61 [ $RETVAL = 0 ] && rm -f /var/lock/subsys/shibd $pidfile
64 # See how we were called.
82 echo $"Usage: $prog {start|stop|status|restart}"