summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-03-29 13:42:31 +0100
committerErich Eckner <git@eckner.net>2019-03-29 13:42:31 +0100
commit7f0ec510c84f13b05cf887a2dcf9f141a3d4631b (patch)
tree5039d4ee211261bd81371cf7227f5172ecec0ad4
parent48bbaac77eff75ef36d0e0b0308c9f8e148befb6 (diff)
downloadupdate-ddns-7f0ec510c84f13b05cf887a2dcf9f141a3d4631b.tar.xz
update-ddns.in: do not abort if curl fails once (other runs might still succeed)
-rw-r--r--update-ddns.in8
1 files changed, 5 insertions, 3 deletions
diff --git a/update-ddns.in b/update-ddns.in
index ff589d8..ce65561 100644
--- a/update-ddns.in
+++ b/update-ddns.in
@@ -2,8 +2,6 @@
# version #VERSION#
-set -e
-
stty &> /dev/null || \
sleep $[$RANDOM%60]
@@ -93,6 +91,8 @@ ignoreIps='^\('"$(
'
)"'\)$'
+err=0
+
for dnsName in $( \
echo "${dnsNamen[@]}" | \
tr ' ' '\n' | \
@@ -169,6 +169,8 @@ do
else
updateIps='?address='"${updateIps#,}"
fi
- curl ${curlForceIpVer} -sS "${updateUrl}${updateIps}" 2> /dev/null
+ curl ${curlForceIpVer} -sS "${updateUrl}${updateIps}" 2> /dev/null || err=$?
fi
done
+
+exit ${err}