From 29c56ee9fd0276090bb087f86d798dd18b3153b8 Mon Sep 17 00:00:00 2001 From: "Moritz Kaspar Rudert (mortzu)" Date: Thu, 25 Jun 2020 11:16:03 +0200 Subject: [PATCH] Check unbound config before reloading --- roles/icvpn/templates/icvpn-update | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/icvpn/templates/icvpn-update b/roles/icvpn/templates/icvpn-update index 5af63403..ed8d7103 100644 --- a/roles/icvpn/templates/icvpn-update +++ b/roles/icvpn/templates/icvpn-update @@ -15,4 +15,6 @@ birdc6 configure > /dev/null # TODO: This doesn't belong here but in the unbound role sudo -u nobody /opt/{{ site_code }}/icvpn-scripts/mkdns -s "$DATADIR" -x bremen -f unbound > /etc/unbound/unbound.conf.d/icvpn.conf -unbound-control reload > /dev/null +if unbound-checkconf /etc/unbound/unbound.conf.d/icvpn.conf >/dev/null 2>&1; then + unbound-control reload > /dev/null +fi