blob: 4fa26d00bff0105dcac6282978b8f25f2c7bd35d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/bash
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
if [ "$UID" -ne 0 ]; then
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 -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 -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
|