[or-cvs] These settings are required for those using launchd in OSX ...

phobos at seul.org phobos at seul.org
Sun Jul 23 12:52:09 UTC 2006


Update of /home/or/cvsroot/tor/contrib/osx
In directory moria:/tmp/cvs-serv15864

Modified Files:
	TorPostflight 
Log Message:
These settings are required for those using launchd in OSX 10.4.
This is a crude but functional way to insert them for now.


Index: TorPostflight
===================================================================
RCS file: /home/or/cvsroot/tor/contrib/osx/TorPostflight,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -d -r1.19 -r1.20
--- TorPostflight	21 Jul 2006 04:30:18 -0000	1.19
+++ TorPostflight	23 Jul 2006 12:52:06 -0000	1.20
@@ -119,9 +119,19 @@ if [ $OS = "tiger" ]; then
   if [ -f $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist ]; then
      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
+     grep -q "#--START" $TARGET/torrc
+  if [ "$?" -ne "0" ]; then
+     echo "#--START required settings--" >> $TARGET/torrc
+     echo "RunAsDaemon 0" >> $TARGET/torrc
+     echo "Log notice file $TARGET/var/log/tor/tor.log" >> $TARGET/torrc
+     echo "DataDirectory $TARGET/var/lib/tor" >> $TARGET/torrc
+     echo "Group daemon" >> $TARGET/torrc
+     echo "User _tor" >> $TARGET/torrc
+     echo "PidFile /var/run/Tor.pid" >> $TARGET/torrc
+     echo "#--END required settings--" >> $TARGET/torrc
+  fi
      /bin/launchctl load /System/Library/LaunchDaemons/net.freehaven.tor.plist
      /bin/launchctl start net.freehaven.tor
-  fi
 else
   if [ -d /Library/StartupItems/Tor ]; then
     rm -f /Library/StartupItems/Tor/Tor.loc



More information about the tor-commits mailing list