dynamic-ip/src/plugins/update-ipv6

19 lines
430 B
Plaintext

plugin_name=$1
check_record=$2
updateerrors=0
if [[ -z "$check_record" ]]; then
logerr "ERROR: Need to provide a DNS record or file to look-up"
exit 1
else
if [[ -r "$check_record" ]]; then
while read -r d; do
check-update 6 "$d" || let updateerrors++
done < <(getRecords "$check_record")
else
check-update 6 "$check_record" || let updateerrors++
fi
fi
exit $updateerrors