summaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-11-13 09:07:59 -0500
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-11-13 09:07:59 -0500
commitbdc0ed8065d8b9a4311cab687365177f52c8b5fd (patch)
tree324fcb5946bc1a68d6635bf95f2167f72e135fe4 /installer
parent165bc589fdb5e8d3dd03f2e6030172629eb07ded (diff)
downloadinfinitytier-bdc0ed8065d8b9a4311cab687365177f52c8b5fd.tar.gz
infinitytier-bdc0ed8065d8b9a4311cab687365177f52c8b5fd.zip
Uninstall scripts.
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/linux/uninstall.sh2
-rwxr-xr-xinstaller/mac/uninstall.sh33
2 files changed, 27 insertions, 8 deletions
diff --git a/installer/linux/uninstall.sh b/installer/linux/uninstall.sh
index 292ac22f..18b8a50b 100755
--- a/installer/linux/uninstall.sh
+++ b/installer/linux/uninstall.sh
@@ -37,3 +37,5 @@ echo "as identity.secret and can be manually deleted if you wish. Save it if"
echo "you wish to re-use the address of this node, as it cannot be regenerated."
echo
+
+exit 0
diff --git a/installer/mac/uninstall.sh b/installer/mac/uninstall.sh
index 2d4079ad..4fa26d00 100755
--- a/installer/mac/uninstall.sh
+++ b/installer/mac/uninstall.sh
@@ -1,21 +1,38 @@
#!/bin/bash
+export PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
if [ "$UID" -ne 0 ]; then
- echo "Must be run as root; try: sudo ./uninstall.sh"
+ echo "Must be run as root; try: sudo $0"
exit 1
fi
+echo
+
+echo "This will uninstall ZeroTier One, hit CTRL+C to abort."
+echo "Waiting 5 seconds..."
+sleep 5
+
ztpath="/Library/Application Support/ZeroTier/One"
echo "Killing any running zerotier-one service..."
-killall zerotier-one
-sleep 5
+killall -TERM zerotier-one >>/dev/null 2>&1
+sleep 3
+killall -KILL zerotier-one >>/dev/null 2>&1
+
+echo "Unloading kernel extension..."
+kextunload "$ztpath/tap.kext"
echo "Erasing binary and support files..."
cd $ztpath
-rm -fv zerotier-one
-rm -rfv updates.d
-rm -fv *.persist
-rm -rfv networks.d
-rm -fv authtoken.secret
+rm -rfv zerotier-one *.persist authtoken.secret identity.public *.log *.pid *.kext
+
+echo "Done."
+echo
+echo "Your ZeroTier One identity is still preserved in $ztpath"
+echo "as identity.secret and can be manually deleted if you wish. Save it if"
+echo "you wish to re-use the address of this node, as it cannot be regenerated."
+
+echo
+exit 0