Update kejilion.sh

This commit is contained in:
科技lion 2025-09-10 13:50:27 +08:00 committed by GitHub
parent e70f8fba38
commit 8f2fa2fb25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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配置"
;;
*)