Browse Source

fi, fy fo fum, if-then- doesn't work without one

svn:r6928
Andrew Lewman 19 years ago
parent
commit
79144b8eb0
1 changed files with 11 additions and 9 deletions
  1. 11 9
      contrib/osx/TorPostflight

+ 11 - 9
contrib/osx/TorPostflight

@@ -128,15 +128,17 @@ if [ $OS = "tiger" || $OS = "leopard" ]; then
      cp $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist /System/Library/LaunchDaemons/net.freehaven.tor.plist
      cp $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist /System/Library/LaunchDaemons/net.freehaven.tor.plist
      chmod 644 /System/Library/LaunchDaemons/net.freehaven.tor.plist
      chmod 644 /System/Library/LaunchDaemons/net.freehaven.tor.plist
      if [ -f $TARGET/torrc ]; then
      if [ -f $TARGET/torrc ]; then
-     IFS=,
+       IFS=,
-     CONFIGVARS="#--START,RunAsDaemon 0,Log notice file $TARGET/var/log/tor/tor.log,DataDirectory $TARGET/var/lib/tor,Group daemon,User _tor,PidFile /var/run/Tor.pid,#--END"
+       CONFIGVARS="#--START,RunAsDaemon 0,Log notice file $TARGET/var/log/tor/tor.log,DataDirectory $TARGET/var/lib/tor,Group daemon,User _tor,PidFile /var/run/Tor.pid,#--END"
-     for var in ${CONFIGVARS}
+       for var in ${CONFIGVARS}
-     do
+         do
-	RC=`grep ^$var $TARGET/torrc`
+	 RC=`grep ^$var $TARGET/torrc`
-	if [ -z $RC ]; then
+	 if [ -z $RC ]; then
-	  echo "$var" >> $TARGET/torrc
+	   echo "$var" >> $TARGET/torrc
-	fi
+	 fi
-     done
+       done
+     fi
+  fi
      /bin/launchctl load /System/Library/LaunchDaemons/net.freehaven.tor.plist
      /bin/launchctl load /System/Library/LaunchDaemons/net.freehaven.tor.plist
      /bin/launchctl start net.freehaven.tor
      /bin/launchctl start net.freehaven.tor
 else
 else