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 function just hangs, so I'm using su directly
40 su - $SHIBD_USER -c "$shibd -p $pidfile -f &"
44 [ $RETVAL = 0 ] && touch /var/lock/subsys/shibd
49 echo -n $"Stopping $prog: "
50 if [ -f $pidfile ]; then
59 [ $RETVAL = 0 ] && rm -f /var/lock/subsys/shibd $pidfile
62 # See how we were called.
80 echo $"Usage: $prog {start|stop|restart}"