summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lewman <andrew@torproject.org>2006-07-23 12:52:06 +0000
committerAndrew Lewman <andrew@torproject.org>2006-07-23 12:52:06 +0000
commit4fccf84004cba03ca777237fd76cba6cefd9137a (patch)
tree0df3e0e7e090ebfe2f9e7e0c02ea735675e28410
parentc9b8458f5980737ae796710ab48923f3e2ecbb58 (diff)
downloadtor-4fccf84004cba03ca777237fd76cba6cefd9137a.tar.gz
tor-4fccf84004cba03ca777237fd76cba6cefd9137a.zip
These settings are required for those using launchd in OSX 10.4.
This is a crude but functional way to insert them for now. svn:r6820
-rw-r--r--contrib/osx/TorPostflight12
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/osx/TorPostflight b/contrib/osx/TorPostflight
index 5e74976bfa..a8991bb365 100644
--- a/contrib/osx/TorPostflight
+++ b/contrib/osx/TorPostflight
@@ -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