소스 검색

added if to reduce externalip queries

if extip already exists then skip over the query. Should help reduce the chance of getting error 429 Too Many Requests
Daniel Gibbs 8 년 전
부모
커밋
f1c0b8ea00
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      lgsm/functions/info_distro.sh

+ 3 - 1
lgsm/functions/info_distro.sh

@@ -135,4 +135,6 @@ if [ -d "${backupdir}" ]; then
 fi
 
 # External IP address
-extip=$(curl -m 3 ifconfig.co 2>/dev/null)
+if [ -z "${extip}" ];then
+	extip=$(curl -m 3 ifconfig.co 2>/dev/null)
+fi