mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
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
This commit is contained in:
parent
c9b8458f59
commit
4fccf84004
@ -119,9 +119,19 @@ if [ $OS = "tiger" ]; then
|
|||||||
if [ -f $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist ]; 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
|
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
|
||||||
|
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 load /System/Library/LaunchDaemons/net.freehaven.tor.plist
|
||||||
/bin/launchctl start net.freehaven.tor
|
/bin/launchctl start net.freehaven.tor
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
if [ -d /Library/StartupItems/Tor ]; then
|
if [ -d /Library/StartupItems/Tor ]; then
|
||||||
rm -f /Library/StartupItems/Tor/Tor.loc
|
rm -f /Library/StartupItems/Tor/Tor.loc
|
||||||
|
Loading…
Reference in New Issue
Block a user