From 197745f28582a7f6d752f8636ba78d5cb6f54a12 Mon Sep 17 00:00:00 2001 From: Andrew Lewman Date: Wed, 11 Apr 2007 00:42:49 +0000 Subject: Make sure the logfile exists and has the correct permissions. svn:r9941 --- contrib/osx/TorPostflight | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'contrib') 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 -- cgit v1.2.3-54-g00ecf