From 7aefc4420bba4b36562a2d883efbd5ba81dd946e Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Dec 14 2011 21:58:18 +0000 Subject: add tmpfiles.d support for the cookiedir --- diff --git a/setup-ds-dsgw.in b/setup-ds-dsgw.in index 4e2d6ad..ba1a484 100644 --- a/setup-ds-dsgw.in +++ b/setup-ds-dsgw.in @@ -251,6 +251,13 @@ fi chown $dsgwuser:$dsgwgroup "$cookiedir" chmod 0700 "$cookiedir" +if [ -d /etc/tmpfiles.d -a ! -f /etc/tmpfiles.d/dirsrv-dsgw.conf ] ; then + echo Updating information in /etc/tmpfiles.d/dirsrv-dsgw.conf + parentdir=`dirname $cookiedir` + echo "d $parentdir 0700 $dsgwuser $dsgwgroup" > /etc/tmpfiles.d/dirsrv-dsgw.conf || { echo Error: could not update /etc/tmpfiles.d/dirsrv-dsgw.conf ; echo skipping tmpfiles.d configuration; } + echo "d $cookiedir 0700 $dsgwuser $dsgwgroup" >> /etc/tmpfiles.d/dirsrv-dsgw.conf || { echo Error: could not update /etc/tmpfiles.d/dirsrv-dsgw.conf ; echo skipping tmpfiles.d configuration; } +fi + # tell Apache about the dsgw - must restart Apache echo Adding configuration to httpd config file $httpdconf . . . grep dsgw-httpd.conf "$httpdconf" > /dev/null 2>&1 || (echo "" ; echo "# DSGW configuration" ; echo "Include $dsgwconfigdir/dsgw-httpd.conf") >> $httpdconf