mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 13:24:09 -07:00
Linux uninstall and init script.
This commit is contained in:
parent
34302edcc5
commit
085ad9073b
2 changed files with 76 additions and 92 deletions
|
@ -3,32 +3,34 @@
|
|||
export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/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 "Going to 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
|
||||
sleep 3
|
||||
killall -q -TERM zerotier-one
|
||||
sleep 2
|
||||
killall -q -KILL zerotier-one
|
||||
|
||||
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 -fv identity.public
|
||||
cd /var/lib/zerotier-one
|
||||
rm -fv zerotier-one *.persist authtoken.secret identity.public *.log
|
||||
rm -rfv updates.d networks.d iddb.d
|
||||
|
||||
echo "Removing init items..."
|
||||
chkconfig zerotier-one off
|
||||
rm -fv /etc/init.d/zerotier-one
|
||||
find /etc/rc*.d -name '???zerotier-one' -print0 | xargs -0 rm -fv
|
||||
|
||||
echo "Done. (identity still preserved in $ztpath)"
|
||||
echo "Done."
|
||||
echo
|
||||
echo "Your ZeroTier One identity is still preserved in /var/lib/zerotier-one"
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue