Przeglądaj źródła

Make sure the logfile exists and has the correct permissions.

svn:r9941
Andrew Lewman 17 lat temu
rodzic
commit
197745f285
1 zmienionych plików z 7 dodań i 3 usunięć
  1. 7 3
      contrib/osx/TorPostflight

+ 7 - 3
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