summaryrefslogtreecommitdiff
path: root/update-ddns.in
diff options
context:
space:
mode:
Diffstat (limited to 'update-ddns.in')
-rw-r--r--update-ddns.in15
1 files changed, 7 insertions, 8 deletions
diff --git a/update-ddns.in b/update-ddns.in
index 72e89a7..7aef624 100644
--- a/update-ddns.in
+++ b/update-ddns.in
@@ -99,9 +99,9 @@ for dnsName in $( \
updateUrl="${updateUrls[${j}]}"
if [[ "${dnsName}" == *'/'* ]]; then
- dnsIps="$(
+ dnsIps=$(
curl ${ipCmdVers[${j}]} "${dnsName}" 2> /dev/null
- )"
+ )
ips='1'
updateIps="${updateIps}"',auto'
if [ -n "${curlForceIpVer}" ] && [ "${curlForceIpVer}" != "${ipCmdVers[${j}]}" ]; then
@@ -110,27 +110,26 @@ for dnsName in $( \
fi
curlForceIpVer="${ipCmdVers[${j}]}"
else
- dnsIps="$(
+ dnsIps=$(
dig $1 "${dnsName}" ${dnsVers[${j}]} | \
sed '/^;; AUTHORITY SECTION:$/Q' | \
grep '^[^;]' | \
grep "\s${dnsVers[${j}]}\s" | \
awk '{print $5}' | \
sort -u
- )"
+ )
- ips="$(
+ ips=$(
"${ipCmd}" -o ${ipCmdVers[${j}]} addr show scope global | \
awk '{print $4}' | \
cut -d/ -f1 | \
grep -vx "${ignoreIps}" | \
sort -u
- )"
+ )
if [ $(echo "${ips}" | grep -c '.') -eq 0 ]; then
updateIps="${updateIps}"',auto'
- if [ -n "${curlForceIpVer}" ] && [ "${curlForceIpVer}" != "${ipCmdVers[${j}]}" ]
- then
+ if [ -n "${curlForceIpVer}" ] && [ "${curlForceIpVer}" != "${ipCmdVers[${j}]}" ]; then
>&2 echo 'Error: I cannot determine two different ip versions automatically (because Erich didn'"'"'t need it).'
exit 1
fi