Check that 'rndc dnstap -roll <value>' works

This commit is contained in:
Mark Andrews
2020-06-22 14:41:55 +10:00
parent 7c07129a51
commit a289a57c7f
3 changed files with 44 additions and 3 deletions

View File

@@ -547,6 +547,22 @@ retry_quiet() {
_retry "$@"
}
# _repeat: keep running command up to $1 times, unless it fails
_repeat() (
__retries="${1}"
shift
while :; do
if ! "$@"; then
return 1
fi
__retries=$((__retries-1))
if [ "${__retries}" -le 0 ]; then
break
fi
done
return 0
)
rndc_reload() {
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reload $3 2>&1 | sed 's/^/'$1' /'`"
# reloading single zone is synchronous, if we're reloading whole server