- touch $pidfile
- chown $SHIBD_USER:$SHIBD_USER $pidfile
- if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
- /sbin/restorecon $pidfile
- fi
- daemon --user $SHIBD_USER --pidfile $pidfile $shibd -p $pidfile -f -w 3
+ touch $pidfile
+ chown $SHIBD_USER:$SHIBD_USER $pidfile
+
+ # Handle transition from root to non-root packages.
+ chown -R $SHIBD_USER:$SHIBD_USER @-PKGRUNDIR-@ 2>/dev/null || :
+ daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30
+
+ # Adjust native logging directory permission so log roll-over works
+ chown apache:apache @-SHIRELOGDIR-@