diff options
author | Erich Eckner <git@eckner.net> | 2020-02-20 21:53:45 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-02-20 21:53:45 +0100 |
commit | 669959e4d213ed943cb534337eef670de9a40c60 (patch) | |
tree | a032f21c7d5fd883c8abf2a460d63d1de39ba8be | |
parent | dce11cff3aa17acfb55f062faa8ce70cca66409f (diff) | |
download | update-ddns-669959e4d213ed943cb534337eef670de9a40c60.tar.xz |
update-ddns: -f new
-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}" |