unbound: improve NTP hotplug behavior when Unbound is disabled

If Unbound was disabled and at later time enabled, then it
would operate in DNSSEC less-secure mode. When NTP hotplug
was called, the timestamp file was not updated. This was
found testing Unbound vs other tools (bind, dnsmasq).

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
This commit is contained in:
Eric Luehrsen 2016-12-23 02:37:21 -05:00
parent 7c374fa372
commit ee8b15cad2

View file

@ -17,11 +17,9 @@
##############################################################################
if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] \
&& /etc/init.d/unbound enabled ; then
#
if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] ; then
echo "ntpd: $( date )" > $UNBOUND_TIMEFILE
/etc/init.d/unbound restart
/etc/init.d/unbound enabled && /etc/init.d/unbound restart
fi
##############################################################################