-
Notifications
You must be signed in to change notification settings - Fork 46
/
go-cai-dat-v2ray.sh
28 lines (28 loc) · 936 Bytes
/
go-cai-dat-v2ray.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
clear
echo "Script by fb.com/thuong.hai.581"
echo "Hỗ trợ: Ubuntu/Centos"
echo "Đang dừng v2ray server"
sudo docker kill v2ray
echo "Đang nhận diện distro linux"
dist=$(hostnamectl | egrep "Operating System" | cut -f2 -d":" | cut -f2 -d " ")
if [ $dist = "CentOS" ] ; then
echo "Bạn đang sử dụng CentOS"
sleep 1
echo "Đang gỡ cài đặt phần mềm cần thiết"
sudo yum remove -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
clear
echo "Đang bật firewall"
sudo systemctl start firewalld
sudo systemctl enable firewalld
clear
elif [ $dist = "Ubuntu" -o $dist = "Debian" ] ; then
echo "Bạn đang sử dụng Ubuntu"
sleep 1
echo "Đang gỡ đặt phần mềm cần thiết"
sudo apt remove -y docker docker.io
clear
echo "Đang bật firewall"
sudo ufw enable
clear
fi
echo "Xong!!!"