mirror of
https://github.com/kejilion/sh.git
synced 2025-10-03 23:34:20 +08:00
Update kejilion.sh
This commit is contained in:
parent
e70f8fba38
commit
8f2fa2fb25
1 changed files with 10 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
sh_v="4.1.3"
|
||||
sh_v="4.1.4"
|
||||
|
||||
|
||||
gl_hui='\e[37m'
|
||||
|
@ -4334,9 +4334,11 @@ set_dns() {
|
|||
|
||||
ip_address
|
||||
|
||||
chattr -i /etc/resolv.conf
|
||||
rm /etc/resolv.conf
|
||||
touch /etc/resolv.conf
|
||||
|
||||
|
||||
if [ -n "$ipv4_address" ]; then
|
||||
echo "nameserver $dns1_ipv4" >> /etc/resolv.conf
|
||||
echo "nameserver $dns2_ipv4" >> /etc/resolv.conf
|
||||
|
@ -4347,6 +4349,8 @@ if [ -n "$ipv6_address" ]; then
|
|||
echo "nameserver $dns2_ipv6" >> /etc/resolv.conf
|
||||
fi
|
||||
|
||||
chattr +i /etc/resolv.conf
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -4391,7 +4395,9 @@ while true; do
|
|||
;;
|
||||
3)
|
||||
install nano
|
||||
chattr -i /etc/resolv.conf
|
||||
nano /etc/resolv.conf
|
||||
chattr +i /etc/resolv.conf
|
||||
send_stats "手动编辑DNS配置"
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue