summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-03-12 13:41:31 +0100
committerErich Eckner <git@eckner.net>2017-03-12 13:41:31 +0100
commit15b4b489ad156a51dd07ec61087c75faba324500 (patch)
tree3d5f202d6ab3b74bd3e2fc5438e8c9d1e59a2d5e
parent2c5a48c11e0cb1900da73b3746ea9091680e42f3 (diff)
downloadupdate-ddns-15b4b489ad156a51dd07ec61087c75faba324500.tar.xz
possibly ignore non-available ip-Versions
-rw-r--r--update-ddns.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/update-ddns.in b/update-ddns.in
index afbc11a..2162770 100644
--- a/update-ddns.in
+++ b/update-ddns.in
@@ -30,6 +30,12 @@ do
continue
fi
+ if [[ "${ipVer}" == *"?" ]]
+ then
+ ipVer="${ipVer%?}"
+ [ -z "$(${ipCmd} -o -${ipVer} addr show scope global)" ] && continue
+ fi
+
if [ "${ipVer}" == '4' ]
then
dnsVers[${i}]='A'