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 export SHIBD_PID=$pidfile
40 chown $SHIBD_USER:$SHIBD_USER $pidfile
41 if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
42 /sbin/restorecon $pidfile
44 daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30
48 [ $RETVAL = 0 ] && touch /var/lock/subsys/shibd
53 echo -n $"Stopping $prog: "
58 [ $RETVAL = 0 ] && rm -f /var/lock/subsys/shibd $pidfile
61 # See how we were called.
79 echo $"Usage: $prog {start|stop|status|restart}"