dynamic-ip/src/plugins/update-ipv4

23 lines
487 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
for d in $(getRecords "$check_record"); do
if check-update 4 "$d"; then
let updateerrors++
fi
done
else
if check-update 4 "$check_record"; then
let updateerrors++
fi
fi
fi
exit $updateerrors