]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make sure the logfile exists and has the correct permissions.
authorAndrew Lewman <andrew@torproject.org>
Wed, 11 Apr 2007 00:42:49 +0000 (00:42 +0000)
committerAndrew Lewman <andrew@torproject.org>
Wed, 11 Apr 2007 00:42:49 +0000 (00:42 +0000)
svn:r9941

contrib/osx/TorPostflight

index e20090150c6d3037f8bc0b5828ee4bc061542c2a..b1a9e541f44f4b4fa96dfaa292670e45ed4395a0 100644 (file)
@@ -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