-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,35 @@ | ||
#!/bin/sh | ||
|
||
/tmp/tailscale down --accept-risk=lose-ssh | ||
/tmp/tailscale logout | ||
/etc/init.d/tailscale disable | ||
/etc/init.d/tailscale stop | ||
ip link delete tailscale0 | ||
rm -rf /etc/tailscale* | ||
rm -rf /etc/config/tailscale* | ||
rm -rf /etc/init.d/tailscale* | ||
rm -rf /usr/bin/tailscale* | ||
rm -rf /tmp/tailscale* | ||
rm -rf /var/lib/tailscale* | ||
echo "已清除配置文件, 正在查找残余文件, 此步需要的时间较久,请耐心等待" | ||
cd / | ||
find . -type f -name "*tailscale*" -exec rm -f {} + | ||
find . -type d -name "*tailscale*" -exec rm -rf {} + | ||
echo "已清除, 强烈推荐重启您的openwrt" | ||
cleanup() { | ||
echo "已清除配置文件,正在查找残余文件,此步需要的时间较久,请耐心等待" | ||
cd / | ||
find . -type f -name "*tailscale*" -exec rm -f {} + | ||
find . -type d -name "*tailscale*" -exec rm -rf {} + | ||
echo "已清除,强烈推荐重启您的OpenWRT" | ||
} | ||
|
||
if [ ! -e /tmp/tailscaled ]; then | ||
echo "文件不存在,执行清除操作" | ||
/tmp/tailscale down --accept-risk=lose-ssh | ||
/tmp/tailscale logout | ||
/etc/init.d/tailscale disable | ||
/etc/init.d/tailscale stop | ||
rm -rf /etc/tailscale* | ||
rm -rf /etc/config/tailscale* | ||
rm -rf /etc/init.d/tailscale* | ||
rm -rf /usr/bin/tailscale* | ||
rm -rf /tmp/tailscale* | ||
rm -rf /var/lib/tailscale* | ||
ip link delete tailscale0 | ||
cleanup | ||
else | ||
echo "文件存在,执行清除操作" | ||
rm -rf /etc/tailscale* | ||
rm -rf /etc/config/tailscale* | ||
rm -rf /etc/init.d/tailscale* | ||
rm -rf /usr/bin/tailscale* | ||
rm -rf /tmp/tailscale* | ||
rm -rf /var/lib/tailscale* | ||
ip link delete tailscale0 | ||
cleanup | ||
fi |