summaryrefslogtreecommitdiff
path: root/contrib/osx
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-09-24 17:20:41 +0000
committerNick Mathewson <nickm@torproject.org>2006-09-24 17:20:41 +0000
commit9006dbeb812168e0eb7ec707a61a7d539b18ecea (patch)
tree17eb1979d71a24c99cff0d87f047f3aaa8875c5d /contrib/osx
parentbf738d30808190fcd20e8bcb3e75b17f7b730105 (diff)
downloadtor-9006dbeb812168e0eb7ec707a61a7d539b18ecea.tar.gz
tor-9006dbeb812168e0eb7ec707a61a7d539b18ecea.zip
Oops. My last commit to the 1.1 branch somehow merged the whole stable branch in. Bad idea. This should revert it.
svn:r8479
Diffstat (limited to 'contrib/osx')
-rw-r--r--contrib/osx/Makefile.am3
-rw-r--r--contrib/osx/TorPostflight27
-rw-r--r--contrib/osx/TorPreFlight29
-rw-r--r--contrib/osx/Tor_Uninstaller.app.tar.gzbin20172 -> 0 bytes
-rw-r--r--contrib/osx/Tor_Uninstaller.applescript57
-rw-r--r--contrib/osx/package.sh3
-rwxr-xr-xcontrib/osx/uninstall_tor_bundle.sh2
7 files changed, 36 insertions, 85 deletions
diff --git a/contrib/osx/Makefile.am b/contrib/osx/Makefile.am
index 3fa7047ee1..f26148593f 100644
--- a/contrib/osx/Makefile.am
+++ b/contrib/osx/Makefile.am
@@ -6,5 +6,4 @@ EXTRA_DIST = PrivoxyConfDesc.plist PrivoxyConfInfo.plist \
TorInfo.plist.in TorStartupDesc.plist.in TorStartupInfo.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 \
- TorPreFlight
+ package_list.txt tor_logo.gif
diff --git a/contrib/osx/TorPostflight b/contrib/osx/TorPostflight
index 8c8c32aa4f..cd49924947 100644
--- a/contrib/osx/TorPostflight
+++ b/contrib/osx/TorPostflight
@@ -37,7 +37,7 @@ chown $TORUSER $LOGDIR
chgrp daemon $LOGDIR
chmod 700 $LOGDIR
-# Create the configuration file only if there wasn't one already.
+# Create the configuration file only if there wan't one already.
if [ ! -f $TARGET/torrc ]; then
cp $TARGET/torrc.sample $TARGET/torrc
fi
@@ -63,6 +63,11 @@ if [ ! -e /var/log/tor -o -L /var/log/tor ]; then
ln -sf $LOGDIR tor
fi
+if [ -d /Library/StartupItems/Tor ]; then
+ rm -f /Library/StartupItems/Tor/Tor.loc
+ echo "$TARGET" > /Library/StartupItems/Tor/Tor.loc
+fi
+
if [ -d /Library/StartupItems/Privoxy ]; then
find /Library/StartupItems/Privoxy -print0 | xargs -0 chown root:wheel
fi
@@ -78,14 +83,6 @@ if [ -f $PACKAGE_PATH/Contents/Resources/Tor_Uninstaller.applescript ]; then
chmod 755 $TARGET/Tor_Uninstaller.applescript
fi
-if [ -f $PACKAGE_PATH/Contents/Resources/Tor_Uninstaller.app.tar.gz ]; then
- cp $PACKAGE_PATH/Contents/Resources/Tor_Uninstaller.app.tar.gz $TARGET/Tor_Uninstaller.app.tar.gz
- cd $TARGET && tar zxf Tor_Uninstaller.app.tar.gz
- chmod -R 755 $TARGET/Tor_Uninstaller.app
- chown -R _tor:_tor Tor_Uninstaller.app
- rm $TARGET/Tor_Uninstaller.app.tar.gz
-fi
-
if [ -f $PACKAGE_PATH/Contents/Resources/uninstall_tor_bundle.sh ]; then
cp $PACKAGE_PATH/Contents/Resources/uninstall_tor_bundle.sh $TARGET/uninstall_tor_bundle.sh
chmod 755 $TARGET/uninstall_tor_bundle.sh
@@ -94,15 +91,3 @@ fi
if [ -f $PACKAGE_PATH/Contents/Resources/package_list.txt ]; then
cp $PACKAGE_PATH/Contents/Resources/package_list.txt $TARGET/package_list.txt
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
-
-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
deleted file mode 100644
index b147264861..0000000000
--- a/contrib/osx/TorPreFlight
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-# TorPreFlight is invoked before the install begins
-
-# Figure out where Tor is installed
-if [ -f /Library/StartupItems/Tor/Tor.loc ]; then
- TORPATH=`cat /Library/StartupItems/Tor/Tor.loc`
-else
- TORPATH="/Library/Tor/"
-fi
-
-if [ -f /Library/StartupItems/Privoxy/Privoxy.loc ]; then
- PRIVOXYPATH=`cat /Library/StartupItems/Privoxy/Privoxy.loc`
-else
- PRIVOXYPATH="/Library/Privoxy/"
-fi
-
-# Backup all of Tor, just in case
-if [ -d $TORPATH ]; then
- tar zcf /tmp/TorSavedMe.tar.gz $TORPATH/var/lib/tor $TORPATH/torrc $PRIVOXYPATH/config $PRIVOXYPATH/user.action
-fi
-
-# Remove Tor and everything to do with it
-if [ -f $TORPATH/uninstall_tor_bundle.sh ]; then
- $TORPATH/uninstall_tor_bundle.sh
-else
- $PACKAGE_PATH/Contents/Resources/uninstall_tor_bundle.sh
-fi
-
-# This is complete, we have a fresh system on which to install Tor
diff --git a/contrib/osx/Tor_Uninstaller.app.tar.gz b/contrib/osx/Tor_Uninstaller.app.tar.gz
deleted file mode 100644
index add053a1fe..0000000000
--- a/contrib/osx/Tor_Uninstaller.app.tar.gz
+++ /dev/null
Binary files differ
diff --git a/contrib/osx/Tor_Uninstaller.applescript b/contrib/osx/Tor_Uninstaller.applescript
index 246e265bbe..79ac46f9aa 100644
--- a/contrib/osx/Tor_Uninstaller.applescript
+++ b/contrib/osx/Tor_Uninstaller.applescript
@@ -35,34 +35,31 @@
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- ===============================================================================
-on run
-
- -- Validate & find disk paths
- set boot_disk to (path to startup disk) as string
- set default_tor_path to boot_disk & "Library:Tor"
- set default_privoxy_path to boot_disk & "Library:Privoxy"
- set default_tor_startup_path to boot_disk & "Library:StartupItems:Tor"
- set default_privoxy_startup_path to boot_disk & "Library:StartupItems:Privoxy"
- set shell_script to default_tor_path & ":uninstall_tor_bundle.sh"
- set doomed_path_list to {default_tor_path, default_privoxy_path, default_tor_startup_path, default_privoxy_startup_path}
-
- -- Display what we're removing and ask for validation
- -- this is the simplest way to do this
- set remove_me to display dialog "Welcome to the Tor + Privoxy Uninstaller. This program will remove:" & return & return & POSIX path of default_tor_path & return & POSIX path of default_privoxy_path & return & POSIX path of default_tor_startup_path & return & POSIX path of default_privoxy_startup_path & return & return & "If this looks correct, choose Yes. Otherwise, choose No." buttons {"Yes", "No"} default button "No"
-
- -- Run a shell script to do all the unix work since applescript can't see it at all
- if button returned of result is "Yes" then
- try
- do shell script (POSIX path of shell_script) with administrator privileges
- on error
- display dialog "Too many errors, quitting." buttons {"Quit"} default button "Quit" with icon stop giving up after 3
- quit
- end try
- -- So Long and Thanks for all the Fish!
- display dialog "Thank you for using tor!" buttons {"Ok"} giving up after 3
- else
- display dialog "Thank you for your continued use of Tor & Privoxy" buttons {"You're welcome."} giving up after 3
- end if
-
-end run
+-- Validate & find disk paths
+set boot_disk to (path to startup disk) as string
+set default_tor_path to boot_disk & "Library:Tor"
+set default_privoxy_path to boot_disk & "Library:Privoxy"
+set default_tor_startup_path to boot_disk & "Library:StartupItems:Tor"
+set default_privoxy_startup_path to boot_disk & "Library:StartupItems:Privoxy"
+set shell_script to default_tor_path & ":uninstall_tor_bundle.sh"
+set doomed_path_list to {default_tor_path, default_privoxy_path, default_tor_startup_path, default_privoxy_startup_path}
+
+-- Display what we're removing and ask for validation
+-- this is the simplest way to do this
+set remove_me to display dialog "Welcome to the Tor + Privoxy Uninstaller. This program will remove:" & return & default_tor_path & return & default_privoxy_path & return & default_tor_startup_path & return & default_privoxy_startup_path & return & return & "If this does not look right, choose Yes. Otherwise, choose No." buttons {"Yes", "No"} default button "No"
+
+-- Run a shell script to do all the unix work since applescript can't see it at all
+if button returned of result is "Yes" then
+ try
+ do shell script (shell_script) with administrator privileges
+ on error
+ display dialog "Too many errors, quitting." buttons {"Quit"} default button "Quit" with icon stop giving up after 5
+ quit
+ end try
+ -- So Long and Thanks for all the Fish!
+ display dialog "Thank you for using tor!" buttons {"Ok"} giving up after 5
+else
+ display dialog "Thank you for your continued use of Tor & Privoxy" buttons {"You're welcome."}
+end if
+
-- We're done \ No newline at end of file
diff --git a/contrib/osx/package.sh b/contrib/osx/package.sh
index 85b0e43660..d63c3efab4 100644
--- a/contrib/osx/package.sh
+++ b/contrib/osx/package.sh
@@ -26,7 +26,7 @@ PRIVOXY_PKG_ZIP=~/tmp/privoxyosx_setup_3.0.3.zip
# man packagemaker
# Make sure VERSION is set, so we don't name the package
-# "Tor--$OS-Bundle.dmg"
+# "Tor--$OS-$ARCH-Bundle.dmg"
if [ "XX$VERSION" = 'XX' ]; then
echo "VERSION not set."
exit 1
@@ -83,7 +83,6 @@ cp contrib/osx/ReadMe.rtf $BUILD_DIR/tor_resources
#cp contrib/osx/License.rtf $BUILD_DIR/tor_resources
chmod 755 contrib/osx/TorPostflight
cp contrib/osx/TorPostflight $BUILD_DIR/tor_resources/postflight
-cp contrib/osx/TorPreFlight $BUILD_DIR/tor_resources/preflight
cp contrib/osx/addsysuser $BUILD_DIR/tor_resources/addsysuser
cp contrib/osx/Tor_Uninstaller.applescript $BUILD_DIR/tor_resources/Tor_Uninstaller.applescript
cp contrib/osx/Tor_Uninstaller.app.tar.gz $BUILD_DIR/tor_resources/Tor_Uninstaller.app.tar.gz
diff --git a/contrib/osx/uninstall_tor_bundle.sh b/contrib/osx/uninstall_tor_bundle.sh
index 18b346005c..9d69d09e54 100755
--- a/contrib/osx/uninstall_tor_bundle.sh
+++ b/contrib/osx/uninstall_tor_bundle.sh
@@ -134,7 +134,7 @@ niutil -destroy . /users/$TOR_USER
## clean up
echo ". Cleaning up"
rm -rf $TEMP_BOM_CONTENTS
-rm -rf /Library/Privoxy/ /Library/StartupItems/Privoxy/ /Library/Tor/ /Library/StartupItems/Tor/
+rm -rf /Library/Privoxy/ /Library/StartupItems/Tor/ /Library/StartupItems/Privoxy/ /Library/Tor/
echo ". Finished"