mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
531cc723fe
to save them, let the installer put new files in place, and let the user copy back their custom configs, for now. svn:r11555
24 lines
651 B
Bash
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
|
|
|