From 2d4aad9e419db45302c9e9f44a281eaf8366f2ad Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Mon, 2 Oct 2023 06:24:43 +0900 Subject: [PATCH] Update 10-sysinfo --- Linux_reinstall/Debian/updatemotd/10-sysinfo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Linux_reinstall/Debian/updatemotd/10-sysinfo b/Linux_reinstall/Debian/updatemotd/10-sysinfo index d94c0ff..f18be6d 100644 --- a/Linux_reinstall/Debian/updatemotd/10-sysinfo +++ b/Linux_reinstall/Debian/updatemotd/10-sysinfo @@ -34,9 +34,9 @@ processes=`ps aux | wc -l` localip=`hostname -I | awk '{print $1}'` IPv4=`timeout 1s dig -4 TXT +short o-o.myaddr.l.google.com @ns3.google.com | sed 's/\"//g'` -[[ "$IPv4" == "" ]] && IPv4=`timeout 1s dig -4 TXT CH +short whoami.cloudflare @1.1.1.1 | sed 's/\"//g'` +[[ "$IPv4" == "" ]] && IPv4=`timeout 1s dig -4 TXT CH +short whoami.cloudflare @1.0.0.3 | sed 's/\"//g'` IPv6=`timeout 1s dig -6 TXT +short o-o.myaddr.l.google.com @ns3.google.com | sed 's/\"//g'` -[[ "$IPv6" == "" ]] && IPv6=`timeout 1s dig -6 TXT CH +short whoami.cloudflare @2606:4700:4700::1111 | sed 's/\"//g'` +[[ "$IPv6" == "" ]] && IPv6=`timeout 1s dig -6 TXT CH +short whoami.cloudflare @2606:4700:4700::1003 | sed 's/\"//g'` # IP_Check=$(echo $IPv4 | awk -F. '$1<255&&$2<255&&$3<255&&$4<255{print "isIPv4"}') IP_Check="$IPv4" if expr "$IP_Check" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' >/dev/null; then