tor/contrib/osx/TorPreFlight
Andrew Lewman 531cc723fe Remove the need to clean up old installs, copy existing configs in order
to save them, let the installer put new files in place, and let the user
copy back their custom configs, for now.


svn:r11555
2007-09-21 13:59:58 +00:00

24 lines
651 B
Bash

#!/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
cp ${TORPATH}/torrc ${TORPATH}/torrc.installer-saved
cp ${PRIVOXYPATH}/config ${PRIVOXYPATH}/config.installer-saved
cp ${PRIVOXYPATH}/user.action ${PRIVOXYPATH}/user.action.installer-saved
fi