]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
OSX pre-install script to clean up Tor and force a fresh install, but
authorAndrew Lewman <andrew@torproject.org>
Wed, 26 Jul 2006 23:52:59 +0000 (23:52 +0000)
committerAndrew Lewman <andrew@torproject.org>
Wed, 26 Jul 2006 23:52:59 +0000 (23:52 +0000)
save the server keys if they exist.

svn:r6911

contrib/osx/TorPreFlight [new file with mode: 0644]

diff --git a/contrib/osx/TorPreFlight b/contrib/osx/TorPreFlight
new file mode 100644 (file)
index 0000000..8cfb53b
--- /dev/null
@@ -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
+