From 26e023157acd6160a7c3065f8df98072d52bb0da Mon Sep 17 00:00:00 2001 From: fbt Date: Wed, 28 Oct 2015 19:22:40 +0300 Subject: [PATCH] conftest for unbound --- init.d/unbound | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/init.d/unbound b/init.d/unbound index b3deb79..a8a61e3 100755 --- a/init.d/unbound +++ b/init.d/unbound @@ -3,3 +3,16 @@ #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 +}