2016-10-28 02:01:00 +00:00
|
|
|
#!/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
|
2018-06-29 00:41:37 +00:00
|
|
|
. /usr/lib/unbound/defaults.sh
|
2016-10-28 02:01:00 +00:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
2018-06-29 00:41:37 +00:00
|
|
|
if [ ! -f "$UB_TIME_FILE" -a "$ACTION" = stratum ] ; then
|
|
|
|
date -Is > $UB_TIME_FILE
|
2016-12-23 07:37:21 +00:00
|
|
|
/etc/init.d/unbound enabled && /etc/init.d/unbound restart
|
2017-03-25 05:53:28 +00:00
|
|
|
# Yes, hard RESTART. We need to be absolutely sure to enable DNSSEC.
|
2016-10-28 02:01:00 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|