d744cb06705b1fc37298d136538db29116f9b602
[librecmc/package-feed.git] / net / unbound / files / unbound.ntpd
1 #!/bin/sh
2 ##############################################################################
3 #
4 # Copyright (C) 2016 Eric Luehrsen
5 #
6 ##############################################################################
7 #
8 # "Restart" Unbound on hotplug NTP ready:
9 # - Only do this the first time when no file exists
10 # - Some of Unbound conf options to not reload run time
11 # - Change the enable flag for DNSSEC date-time checking
12 #
13 ##############################################################################
14
15 # Common file location definitions
16 . /usr/lib/unbound/unbound.sh
17
18 ##############################################################################
19
20 if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] ; then
21   echo "ntpd: $( date )" > $UNBOUND_TIMEFILE
22   /etc/init.d/unbound enabled && /etc/init.d/unbound restart
23   # Yes, hard RESTART. We need to be absolutely sure to enable DNSSEC.
24 fi
25
26 ##############################################################################
27