mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
Uninstaller scripts for *nix.
This commit is contained in:
parent
93427b8cb6
commit
f51478b470
3 changed files with 60 additions and 0 deletions
|
@ -55,6 +55,11 @@
|
||||||
// zerotier-one binary (or zerotier-one.exe for Windows)
|
// zerotier-one binary (or zerotier-one.exe for Windows)
|
||||||
#include "installer-build/zerotier-one.build.c"
|
#include "installer-build/zerotier-one.build.c"
|
||||||
|
|
||||||
|
// Unix uninstall script
|
||||||
|
#ifdef __UNIX_LIKE__
|
||||||
|
#include "installer-build/uninstall.sh.build.c"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Linux init.d script
|
// Linux init.d script
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
#include "installer-build/redhat__init.d__zerotier-one.build.c"
|
#include "installer-build/redhat__init.d__zerotier-one.build.c"
|
||||||
|
|
34
installer/linux/uninstall.sh
Executable file
34
installer/linux/uninstall.sh
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
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"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
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 -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
|
||||||
|
|
||||||
|
echo "Removing init items..."
|
||||||
|
chkconfig zerotier-one off
|
||||||
|
rm -fv /etc/init.d/zerotier-one
|
||||||
|
|
||||||
|
echo "Done. (identity still preserved in $ztpath)"
|
21
installer/mac/uninstall.sh
Executable file
21
installer/mac/uninstall.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$UID" -ne 0 ]; then
|
||||||
|
echo "Must be run as root; try: sudo ./uninstall.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ztpath="/Library/Application Support/ZeroTier/One"
|
||||||
|
|
||||||
|
echo "Killing any running zerotier-one service..."
|
||||||
|
killall zerotier-one
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue