Update sys_info.sh
This commit is contained in:
1 parent
73c4662568
commit
c3dadf3f2e
1 file changed
+1
-1
+1
-1
@@ -27,7 +27,7 @@ RATE=$(curl -s https://api.github.com/rate_limit | grep '"remaining"' | head -1
|
||||
[ -z "$RATE" ] && RATE_OUT="${RED}N/A${NC}" || RATE_OUT=$([ "$RATE" -eq 0 ] && echo -e "${RED}0${NC}" || echo -e "${GREEN}$RATE${NC}")
|
||||
echo -n "API: "; curl -Is --connect-timeout 3 https://api.github.com >/dev/null 2>&1 && echo -e "${GREEN}ok${NC} | Limit: $RATE_OUT" || echo -e "${RED}fail${NC} | Limit: $RATE_OUT"; fi
|
||||
echo -e "\n${GREEN}===== Проверка IPv4 / IPv6 =====${NC}"
|
||||
wget -qO- "http://ip-api.com/line/?fields=as,isp,country,city" | tr '\n' ',' | sed -E 's/AS[0-9]+ ?//g; s/,$//; s/,/, /g; s/(.*), (O.*)/\1\n\2/'
|
||||
wget -qO- "http://ip-api.com/line/?fields=as,country,city" | tr '\n' ',' | sed -E 's/AS[0-9]+ ?//g; s/,$//; s/,/, /g; s/(.*), (O.*)/\1\n\2/; s/\b(OJSC|PJSC|IROKO) //g'
|
||||
echo
|
||||
echo -n "Google IPv4: "; time=$(ping -4 -c 1 -W 2 google.com 2>/dev/null | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}')
|
||||
if [ -n "$time" ]; then echo -e "${GREEN}ok ($time ms)${NC}"; else echo -e "${RED}fail${NC}"; fi
|
||||
|
||||
Reference in new issue
Block a user