From f1c0b8ea001875ec5c43e59a8b69250a1540d9c8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 30 Sep 2017 23:22:55 +0100 Subject: [PATCH] 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 --- lgsm/functions/info_distro.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index b2f75b78b..570e856c1 100644 --- a/lgsm/functions/info_distro.sh +++ b/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) \ No newline at end of file +if [ -z "${extip}" ];then + extip=$(curl -m 3 ifconfig.co 2>/dev/null) +fi \ No newline at end of file