-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAutoChangeDnsVPS.sh
39 lines (32 loc) · 928 Bytes
/
AutoChangeDnsVPS.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
#!/bin/bash
#=================================
# Create by https://t.me/PR_Aiman
# Copyright © Beginner 2024
#=================================
# Remove old dns
rm -f /etc/resolv.conf
# Add new dns
echo "nameserver 1.1.1.1" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
# Download file Dns Change
cd /usr/bin
wget -O Dns "https://github.com/praiman99/AutoChangeDnsVPS/raw/Beginner/Dns.sh"; chmod +x Dns
# Add Dns Change At Crontab
echo "0 6 * * * root bash Dns" >> /etc/crontab
# Add Auto Enable Warp At Crontab
cd /usr/bin
wget -O warp "git.io/warp.sh"; chmod +x warp
bash warp install
bash warp wgx
bash warp wg4
echo "5 6 * * * root bash warp restart" >> /etc/crontab
echo "6 6 * * * root bash warp wgx" >> /etc/crontab
echo "7 6 * * * root bash warp wg4" >> /etc/crontab
clear
# Show Status Warp
echo
bash warp status
read -n 1 -s -r -p " Press any key to Exit"
echo
exit
rm -f AutoChangeDnsVPS