aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lewman <andrew@torproject.org>2006-07-28 13:52:36 +0000
committerAndrew Lewman <andrew@torproject.org>2006-07-28 13:52:36 +0000
commit498fe874343acfef4ec2255e308aff27b0c6b65d (patch)
treea7c3f1da14e244d5a130fe92316e066067b2e9c9
parente469438d20a374c174362cfac1c2fbb9cf84430c (diff)
downloadtor-498fe874343acfef4ec2255e308aff27b0c6b65d.tar
tor-498fe874343acfef4ec2255e308aff27b0c6b65d.tar.gz
So long, farewell, auf Wiedersehen, adieu, launchd
svn:r6932
-rw-r--r--contrib/osx/Makefile.am2
-rw-r--r--contrib/osx/TorPostflight55
-rw-r--r--contrib/osx/TorPreFlight2
-rw-r--r--contrib/osx/package.sh1
-rwxr-xr-xcontrib/osx/uninstall_tor_bundle.sh3
5 files changed, 8 insertions, 55 deletions
diff --git a/contrib/osx/Makefile.am b/contrib/osx/Makefile.am
index d7827f608..3fa7047ee 100644
--- a/contrib/osx/Makefile.am
+++ b/contrib/osx/Makefile.am
@@ -7,4 +7,4 @@ EXTRA_DIST = PrivoxyConfDesc.plist PrivoxyConfInfo.plist \
package.sh privoxy.config TorPostflight addsysuser \
Tor_Uninstaller.applescript uninstall_tor_bundle.sh \
package_list.txt tor_logo.gif Tor_Uninstaller.app.tar.gz \
- net.freehaven.tor.plist.in TorPreFlight
+ TorPreFlight
diff --git a/contrib/osx/TorPostflight b/contrib/osx/TorPostflight
index 25a838bd0..8c8c32aa4 100644
--- a/contrib/osx/TorPostflight
+++ b/contrib/osx/TorPostflight
@@ -19,25 +19,6 @@ if [ "$TARGET" == "//Library/Tor" ]; then
TARGET=/Library/Tor
fi
-## Determine OSX Version
-# map version to name
-if [ -x /usr/bin/sw_vers ]; then
-# This is poor, yet functional. We don't care about the 3rd number in
-# the OS version
- OSVER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2`
- case "$OSVER" in
- "10.5") OS="leopard";;
- "10.4") OS="tiger";;
- "10.3") OS="panther";;
- "10.2") OS="jaguar";;
- "10.1") OS="puma";;
- "10.0") OS="cheetah";;
- *) OS="unknown";;
- esac
-else
- OS="unknown"
-fi
-
# Create user $TORUSER in group daemon. If it's already there, great.
$ADDSYSUSER $TORUSER "Tor System user" $TORDIR
@@ -117,33 +98,11 @@ fi
# If the pre-install script did it's thing, it should have saved the
# config and server keys; put these back and clean up
if [ -f /tmp/TorSavedMe.tar.gz ]; then
- tar zxf /tmp/TorSavedMe.tar.gz -C /
- rm /tmp/TorSavedMe.tar.gz
-fi
-
-# Determine how to start by OS Version
-if [ $OS = "tiger" ]; then
- if [ -f $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist ]; then
- rm -rf /Library/StartupItems/Tor
- 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
- if [ -f $TARGET/torrc ]; then
- 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"
- for var in ${CONFIGVARS}
- do
- RC=`grep ^$var $TARGET/torrc`
- if [ -z $RC ]; then
- echo "$var" >> $TARGET/torrc
- fi
- done
- fi
- fi
- /bin/launchctl load /System/Library/LaunchDaemons/net.freehaven.tor.plist
- /bin/launchctl start net.freehaven.tor
-else
- if [ -d /Library/StartupItems/Tor ]; then
- rm -f /Library/StartupItems/Tor/Tor.loc
- echo "$TARGET" > /Library/StartupItems/Tor/Tor.loc
- fi
+ tar zxf /tmp/TorSavedMe.tar.gz -C /
+ rm /tmp/TorSavedMe.tar.gz
+fi
+
+if [ -d /Library/StartupItems/Tor ]; then
+ rm -f /Library/StartupItems/Tor/Tor.loc
+ echo "$TARGET" > /Library/StartupItems/Tor/Tor.loc
fi
diff --git a/contrib/osx/TorPreFlight b/contrib/osx/TorPreFlight
index 3a3187fc9..d83b9afdc 100644
--- a/contrib/osx/TorPreFlight
+++ b/contrib/osx/TorPreFlight
@@ -4,8 +4,6 @@
# Figure out where Tor is installed
if [ -f /Library/StartupItems/Tor/Tor.loc ]; then
TORPATH=`cat /Library/StartupItems/Tor/Tor.loc`
-elif [ -f /System/Library/LaunchDaemons/net.freehaven.tor.plist ]; then
- TORPATH=/`grep -A1 "<key>Program</key>" /System/Library/LaunchDaemons/net.freehaven.tor.plist | grep string | cut -d"/" -f2,3`
else
TORPATH="/Library/Tor/"
fi
diff --git a/contrib/osx/package.sh b/contrib/osx/package.sh
index 7f4277170..737ea82ef 100644
--- a/contrib/osx/package.sh
+++ b/contrib/osx/package.sh
@@ -90,7 +90,6 @@ cp contrib/osx/Tor_Uninstaller.app.tar.gz $BUILD_DIR/tor_resources/Tor_Uninstall
cp contrib/osx/uninstall_tor_bundle.sh $BUILD_DIR/tor_resources/uninstall_tor_bundle.sh
cp contrib/osx/package_list.txt $BUILD_DIR/tor_resources/package_list.txt
cp contrib/osx/tor_logo.gif $BUILD_DIR/tor_resources/background.gif
-cp contrib/osx/net.freehaven.tor.plist $BUILD_DIR/tor_resources/net.freehaven.tor.plist
cat <<EOF > $BUILD_DIR/tor_resources/Welcome.txt
Tor: an anonymous Internet communication system
diff --git a/contrib/osx/uninstall_tor_bundle.sh b/contrib/osx/uninstall_tor_bundle.sh
index eb70cf776..18b346005 100755
--- a/contrib/osx/uninstall_tor_bundle.sh
+++ b/contrib/osx/uninstall_tor_bundle.sh
@@ -135,9 +135,6 @@ niutil -destroy . /users/$TOR_USER
echo ". Cleaning up"
rm -rf $TEMP_BOM_CONTENTS
rm -rf /Library/Privoxy/ /Library/StartupItems/Privoxy/ /Library/Tor/ /Library/StartupItems/Tor/
-if [ -f /System/Library/LaunchDaemons/net.freehaven.tor.plist ]; then
- rm /System/Library/LaunchDaemons/net.freehaven.tor.plist
-fi
echo ". Finished"