-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>
28 lines
904 B
Bash
Executable file
28 lines
904 B
Bash
Executable file
#!/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
|
|
|
|
##############################################################################
|
|
|