2 # TorPreFlight is invoked before the install begins
4 # Figure out where Tor is installed
5 if [ -f /Library
/StartupItems
/Tor
/Tor.loc
]; then
6 TORPATH
=`cat /Library/StartupItems/Tor/Tor.loc`
8 TORPATH
="/Library/Tor/"
11 if [ -f /Library
/StartupItems
/Privoxy
/Privoxy.loc
]; then
12 PRIVOXYPATH
=`cat /Library/StartupItems/Privoxy/Privoxy.loc`
14 PRIVOXYPATH
="/Library/Privoxy/"
17 # Backup all of Tor, just in case
18 if [ -d $TORPATH ]; then
19 tar zcf
/tmp
/TorSavedMe.
tar.gz
$TORPATH/var
/lib
/tor
$TORPATH/torrc
$PRIVOXYPATH/config
$PRIVOXYPATH/user.action
22 # Remove Tor and everything to do with it
23 if [ -f $TORPATH/uninstall_tor_bundle.sh
]; then
24 $TORPATH/uninstall_tor_bundle.sh
26 $PACKAGE_PATH/Contents
/Resources
/uninstall_tor_bundle.sh
29 # This is complete, we have a fresh system on which to install Tor