forked from suhailsherif/IITG-Transparent-Proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall.sh
51 lines (36 loc) · 1.02 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
#!/bin/bash
## force bash
[ -z $BASH ] && { exec bash "$0" "$@" || exit; }
## run only inside Allproxy folder
cd "$(dirname "$0")"
sudo echo "Uninstalling Allproxy."
if [ -d $HOME/.allproxy ]; then
rm -rf $HOME/.allproxy
fi
## global directory
if [ -d /etc/allproxy ]; then
sudo rm -rf /etc/allproxy
fi
## set allproxy path
cur_path=$(pwd)
## remove application entry in dash
if [ -d /usr/share/applications ]; then
sudo rm -f /usr/share/applications/allproxy.desktop
fi
# turn off automatic dnsmasq
if [ -f /etc/NetworkManager/NetworkManager.conf ]; then
sudo sed -i "s/# dns=dnsmasq/dns=dnsmasq/g" /etc/NetworkManager/NetworkManager.conf
fi
if [ -f /usr/lib/python$python_version/downloader.py ]; then
sudo rm -f /usr/lib/python$python_version/downloader.py
fi
if [ -f /usr/bin/pycurl-download ]; then
sudo rm -f /usr/bin/pycurl-download
fi
if [ -f /var/log/downloader.log ]; then
sudo rm -f /var/log/downloader.log
fi
## remove allproxy folder
rm -rf .
## restart network manager
sudo service network-manager restart