[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r6911: OSX pre-install script to clean up Tor and force a fresh ins (tor/trunk/contrib/osx)



Author: phobos
Date: 2006-07-26 19:52:59 -0400 (Wed, 26 Jul 2006)
New Revision: 6911

Added:
   tor/trunk/contrib/osx/TorPreFlight
Log:
OSX pre-install script to clean up Tor and force a fresh install, but
save the server keys if they exist.


Added: tor/trunk/contrib/osx/TorPreFlight
===================================================================
--- tor/trunk/contrib/osx/TorPreFlight	2006-07-26 21:50:27 UTC (rev 6910)
+++ tor/trunk/contrib/osx/TorPreFlight	2006-07-26 23:52:59 UTC (rev 6911)
@@ -0,0 +1,13 @@
+#!/bin/sh
+# TorPreFlight is invoked before the install begins
+
+# Find the server keys, if they exist and save them, just in case
+if [ -d /Library/Tor/var/lib/tor/keys ]; then
+	tar zcf ~/`date "+%Y-%m-%d"`-Tor-ServerKeys.backup.tar.gz /Library/Tor/var/lib/tor/keys
+fi
+
+# Remove Tor and everything to do with it
+if [ -f /Library/Tor/uninstall_tor_bundle.sh ]; then
+	/Library/Tor/uninstall_tor_bundle.sh
+fi
+