-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathuninstall.sh
executable file
·55 lines (44 loc) · 1.24 KB
/
uninstall.sh
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
# only run as root
if [[ $EUID -gt 0 ]]; then
echo "Please run as root"
exit
fi
ptb_service_user=$(cat "$HOME"/.config/ptb-service-user)
# set -e
apt remove dialog dropbear squid acl -y
# remove nodews1 service
systemctl stop nodews1.service
systemctl disable nodews1.service
rm -rf /etc/systemd/system/nodews1.service
#remove python bot service
systemctl stop ptb@$ptb_service_user.service
systemctl disable ptb@$ptb_service_user.service
rm -rf /etc/systemd/system/[email protected]
#delete ptb service user
userdel -rf $ptb_service_user
# remove stunnel
systemctl stop stunnel4.service
systemctl disable stunnel4.service
apt remove stunnel4 -y
# remove squid
systemctl stop squid.service
systemctl disable squid.service
apt remove squid -y
# remove badvpn / service
systemctl stop badvpn.service
systemctl disable badvpn.service
rm /etc/systemd/system/badvpn.service
rm /usr/local/bin/badvpn-udpgw
rm /usr/local/share/man/badvpn*
rm -rf ~/badvpn-master || true
rm -rf ~/master.zip || true
# remove vnstat
systemctl stop vnstat.service
systemctl disable vnstat.service
apt remove vnstat -y
rm -rf /usr/bin/menu_r
rm -rf /etc/p7common
# delete certs folder
rm -rf /certs
echo "Try 'apt-get autoremove' command for remove orphan packages."