https://issues.shibboleth.net/jira/browse/SSPCPP-411
[shibboleth/cpp-sp.git] / configs / shibd-redhat.in
index 716bdbd..65295f2 100644 (file)
@@ -32,6 +32,9 @@ start() {
                fi
        fi
 
+       # Make sure package run directory exists.
+       [ -d @-PKGRUNDIR-@ ] || mkdir @-PKGRUNDIR-@
+
        export SHIBD_PID=$pidfile
        touch $pidfile
        chown $SHIBD_USER:$SHIBD_USER $pidfile
@@ -39,7 +42,7 @@ start() {
                /sbin/restorecon $pidfile
        fi
        # Handle transition from root to non-root packages.
-       chown $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@/* 2>/dev/null || :
+       chown -R $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@ 2>/dev/null || :
        daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30
 
        RETVAL=$?