diff options
-rw-r--r-- | update-ddns.in | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/update-ddns.in b/update-ddns.in index 0fe0495..ff589d8 100644 --- a/update-ddns.in +++ b/update-ddns.in @@ -20,6 +20,8 @@ then done fi +unset ignoreIps + i=0 while read -r ipVer updateUrl dnsName @@ -30,6 +32,12 @@ do continue fi + if [[ "${ipVer}" == 'ignore' ]] + then + ignoreIps="${ignoreIps} ${updateUrl} ${dnsName}" + continue + fi + if [[ "${ipVer}" == *"?" ]] then ipVer="${ipVer%?}" @@ -71,6 +79,20 @@ do done < #ETCDIR#/update-ddns.conf +ignoreIps='^\('"$( + echo ${ignoreIps} | \ + tr '[:space:]' '\n' | \ + grep -vxF '' | \ + sort -u | \ + sed ' + s@$@\\|@ + ' | \ + tr -d '\n' | \ + sed ' + s@\\|$@@ + ' +)"'\)$' + for dnsName in $( \ echo "${dnsNamen[@]}" | \ tr ' ' '\n' | \ @@ -115,6 +137,7 @@ do "${ipCmd}" -o ${ipCmdVers[${j}]} addr show scope global | \ awk '{print $4}' | \ cut -d/ -f1 | \ + grep -vx "${ignoreIps}" | \ sort -u )" |