dynamic-ip/src/plugins/update-ipv6

23 lines
502 B
Plaintext
Raw Normal View History

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
for d in $(getRecords "$check_record"); do
2017-08-19 19:18:24 -04:00
if ! check-update 6 "$check_record"; then
let updateerrors++
fi
done
else
2017-08-19 19:18:24 -04:00
if ! check-update 6 "$check_record"; then
let updateerrors++
fi
fi
fi
exit $updateerrors