Port up context changes to prevent false spoofing error.
[shibboleth/sp.git] / configs / shibd-redhat.in
index 059e3d5..496f631 100644 (file)
@@ -3,16 +3,16 @@
 # Startup script for the Shibboleth Service Provider Daemon
 #
 # chkconfig: - 98 02
-# description: Shibboleth Service Provider Daemon
+# description: Shibboleth 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
 
@@ -33,6 +33,9 @@ start() {
        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 &"