[or-cvs] r9941: Make sure the logfile exists and has the correct permissions (tor/trunk/contrib/osx)

phobos at seul.org phobos at seul.org
Wed Apr 11 00:42:51 UTC 2007


Author: phobos
Date: 2007-04-10 20:42:49 -0400 (Tue, 10 Apr 2007)
New Revision: 9941

Modified:
   tor/trunk/contrib/osx/TorPostflight
Log:
Make sure the logfile exists and has the correct permissions.


Modified: tor/trunk/contrib/osx/TorPostflight
===================================================================
--- tor/trunk/contrib/osx/TorPostflight	2007-04-11 00:30:34 UTC (rev 9940)
+++ tor/trunk/contrib/osx/TorPostflight	2007-04-11 00:42:49 UTC (rev 9941)
@@ -30,10 +30,14 @@
 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
   cp $TARGET/torrc.sample $TARGET/torrc



More information about the tor-commits mailing list