TorPreFlight 639 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. # TorPreFlight is invoked before the install begins
  3. # Figure out where Tor is installed
  4. if [ -f /Library/StartupItems/Tor/Tor.loc ]; then
  5. TORPATH=`cat /Library/StartupItems/Tor/Tor.loc`
  6. else
  7. TORPATH="/Library/Tor/"
  8. fi
  9. if [ -f /Library/StartupItems/Privoxy/Privoxy.loc ]; then
  10. PRIVOXYPATH=`cat /Library/StartupItems/Privoxy/Privoxy.loc`
  11. else
  12. PRIVOXYPATH="/Library/Privoxy/"
  13. fi
  14. # Backup all of Tor, just in case
  15. if [ -d $TORPATH ]; then
  16. cp $TORPATH/torrc $TORPATH/torrc.installer-saved
  17. cp $PRIVOXYPATH/config $PRIVOXYPATH/config.installer-saved
  18. cp $PRIVOXYPATH/user.action $PRIVOXYPATH/user.action.installer-saved
  19. fi