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
20 echo -n $"Starting $prog: "
21 if [ -f /var/lock/subsys/shibd ] ; then
22 if [ -f $pidfile ]; then
24 if checkpid $kpid 2>&1; then
25 echo "process already running"
28 echo "lock file found but no process running for pid $kpid, continuing"
33 export SHIBD_PID=$pidfile
35 chown $SHIBD_USER:$SHIBD_USER $pidfile
36 if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
37 /sbin/restorecon $pidfile
39 daemon --user $SHIBD_USER --pidfile $pidfile $shibd -p $pidfile -f -w 3
43 [ $RETVAL = 0 ] && touch /var/lock/subsys/shibd
48 echo -n $"Stopping $prog: "
49 if [ -f $pidfile ]; then
50 killproc -p $pidfile shibd
57 [ $RETVAL = 0 ] && rm -f /var/lock/subsys/shibd $pidfile
60 # See how we were called.
78 echo $"Usage: $prog {start|stop|restart}"