c914fa04a3
Use ubus process signalling instead of 'kill pidof dnsmasq' for SIGHUP signalling to dnsmasq when ntp says time is valid. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
14 lines
256 B
Bash
14 lines
256 B
Bash
#!/bin/sh
|
|
|
|
. /lib/functions/procd.sh
|
|
|
|
TIMEVALIDFILE="/var/state/dnsmasqsec"
|
|
|
|
[ "$ACTION" = stratum ] || exit 0
|
|
|
|
[ -f "$TIMEVALIDFILE" ] || {
|
|
echo "ntpd says time is valid" >$TIMEVALIDFILE
|
|
/etc/init.d/dnsmasq enabled && {
|
|
procd_send_signal dnsmasq
|
|
}
|
|
}
|