From: Andrew Lewman Date: Wed, 11 Apr 2007 00:42:49 +0000 (+0000) Subject: Make sure the logfile exists and has the correct permissions. X-Git-Tag: tor-0.2.0.1-alpha~287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=197745f28582a7f6d752f8636ba78d5cb6f54a12;p=thirdparty%2Ftor.git Make sure the logfile exists and has the correct permissions. svn:r9941 --- diff --git a/contrib/osx/TorPostflight b/contrib/osx/TorPostflight index e20090150c..b1a9e541f4 100644 --- a/contrib/osx/TorPostflight +++ b/contrib/osx/TorPostflight @@ -30,9 +30,13 @@ fi chown $TORUSER $TORDIR chgrp daemon $TORDIR chmod 700 $TORDIR -chown $TORUSER $LOGFILE -chgrp daemon $LOGFILE -chmod 660 $LOGFILE + +if [ ! -f $LOGFILE ]; then + touch $LOGFILE + chown $TORUSER $LOGFILE + chgrp daemon $LOGFILE + chmod 660 $LOGFILE +fi # Create the configuration file only if there wasn't one already. if [ ! -f $TARGET/torrc ]; then