diff options
-rw-r--r-- | update-ddns.in | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/update-ddns.in b/update-ddns.in index 9038819..3d005c1 100644 --- a/update-ddns.in +++ b/update-ddns.in @@ -17,6 +17,13 @@ if ! ipCmd=$(which ip 2> /dev/null); then done fi +if [ "x$1" = 'x-f' ]; then + force_update=true + shift +else + force_update=false +fi + sed ' /^\(#\|\s\)/ d s/^\([46]!\?\)\([46]!\?\)\(\s.*$\)/\1\3\n\2\3/ @@ -89,7 +96,7 @@ sed ' fi fi - [ "${dnsIps}" = "${ips}" ] && continue + ! "${force_update}" && [ "${dnsIps}" = "${ips}" ] && continue if [ -z "${updateUrl##*?*}" ]; then updateIps='&address='"${updateIps}" |