mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-10 23:41:22 +00:00
~增加ecs优化功能
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
|
|
||||||
get_ecs_address() {
|
get_ecs_address() {
|
||||||
ip=$(uci get network.wan.dns 2>/dev/null)
|
|
||||||
[ -n "$ip" ] && return
|
|
||||||
for f in /tmp/resolv.conf.auto /tmp/resolv.conf /tmp/resolv.conf.d/resolv.conf.auto; do
|
for f in /tmp/resolv.conf.auto /tmp/resolv.conf /tmp/resolv.conf.d/resolv.conf.auto; do
|
||||||
[ -f "$f" ] || continue
|
[ -f "$f" ] || continue
|
||||||
ip=$(grep -A2 "^# Interface wan" "$f" | grep nameserver | awk '{printf "%s ", $2}')
|
ip=$(grep -A1 "^# Interface wan$" "$f" | grep nameserver | awk '{printf "%s ", $2}')
|
||||||
[ -n "$ip" ] && return
|
[ -n "$ip" ] && return
|
||||||
done
|
done
|
||||||
. "$CRASHDIR"/libs/web_get_lite.sh
|
. "$CRASHDIR"/libs/web_get_lite.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user