#!/usr/bin/env watchman

#service_respawn='true'
service_command='/usr/bin/unbound'
service_args=( -d )

conftest() {
	unbound-checkconf
}

reload() {
	if conftest; then
		watchman.reload
	else
		watchman.err "Configtest failed, not reloading."
		return 1
	fi
}