mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
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>
15 lines
256 B
Bash
15 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
|
|
}
|
|
}
|