tor/contrib/osx/TorPreFlight
2007-10-15 04:04:16 +00:00

24 lines
639 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