# Startup script for the Shibboleth Service Provider Daemon
#
# chkconfig: - 98 02
-# description: Shibboleth Service Provider Daemon
+# description: Shibboleth 2 Service Provider Daemon
# processname: shibd
-# pidfile: @-VARRUNDIR-@/shibd.pid
-# config: @-PKGSYSCONFDIR-@/shibboleth.xml
+# pidfile: @-PKGRUNDIR-@/shibd.pid
+# config: @-PKGSYSCONFDIR-@/shibboleth2.xml
# Source function library.
. /etc/rc.d/init.d/functions
shibd="@-PREFIX-@/sbin/shibd"
SHIBD_USER=root
-pidfile=@-VARRUNDIR-@/shibd.pid
+pidfile=@-PKGRUNDIR-@/shibd.pid
prog=shibd
RETVAL=0
export SHIBD_PID=$pidfile
touch $pidfile
chown $SHIBD_USER:$SHIBD_USER $pidfile
+ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
+ /sbin/restorecon $pidfile
+ fi
# daemon function just hangs, so I'm using su directly
su - $SHIBD_USER -c "$shibd -p $pidfile -f &"