[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



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