lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

commit 416534f95d1f21bc208a4f06c7f6c1b3462aec85
parent 7e2e9d5c89ac439d2e584312fe5fd40a41380280
Author: Eric Luehrsen <ericluehrsen@hotmail.com>
Date:   Thu, 27 Oct 2016 22:01:00 -0400

Unbound: Add hotplug/ntp script to request restart
-DNSSEC needs time, time needs ntp, or power off RTC
-Many consumer routers are cost thrifted without RTC
-Conf "val-override-date: -1" disables time inside DNSSEC
-Need restart as option is not dynamically switchable
-hotplug/ntp is used to set file /var/lib/unbound/unbound.time
-UCI will add or remove option depending on flag-like-file

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>

Diffstat:
Anet/unbound/files/unbound.ntpd | 28++++++++++++++++++++++++++++
1 file changed, 28 insertions(+), 0 deletions(-)

diff --git a/net/unbound/files/unbound.ntpd b/net/unbound/files/unbound.ntpd @@ -0,0 +1,28 @@ +#!/bin/sh +############################################################################## +# +# Copyright (C) 2016 Eric Luehrsen +# +############################################################################## +# +# "Restart" Unbound on hotplug NTP ready: +# - Only do this the first time when no file exists +# - Some of Unbound conf options to not reload run time +# - Change the enable flag for DNSSEC date-time checking +# +############################################################################## + +# Common file location definitions +. /usr/lib/unbound/unbound.sh + +############################################################################## + +if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] \ + && /etc/init.d/dnsmasq enabled ; then + # + echo "ntpd: $( date )" > $UNBOUND_TIMEFILE + /etc/init.d/unbound restart +fi + +############################################################################## +