aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorAndrew Lewman <andrew@torproject.org>2007-04-11 00:42:49 +0000
committerAndrew Lewman <andrew@torproject.org>2007-04-11 00:42:49 +0000
commit197745f28582a7f6d752f8636ba78d5cb6f54a12 (patch)
tree703abe9b075ffeccff04aebc0f854533e3c39f5e /contrib
parent51e4b8d7068a3489fb5cb45a8ebcc20036fd0d35 (diff)
downloadtor-197745f28582a7f6d752f8636ba78d5cb6f54a12.tar
tor-197745f28582a7f6d752f8636ba78d5cb6f54a12.tar.gz
Make sure the logfile exists and has the correct permissions.
svn:r9941
Diffstat (limited to 'contrib')
-rw-r--r--contrib/osx/TorPostflight10
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/osx/TorPostflight b/contrib/osx/TorPostflight
index e20090150..b1a9e541f 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