diff options
author | Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> | 2017-01-12 19:28:53 +0000 |
---|---|---|
committer | Hans Dedecker <hans.dedecker@technicolor.com> | 2017-01-13 16:08:22 +0100 |
commit | c914fa04a3cb20f3c4134c3a2c4a4caf7160edd2 (patch) | |
tree | a833f74f837bf61208a29c2c19bfb506ff5ccf0c /package | |
parent | 749918911d35613f8bf7852d2a91f78ff625739e (diff) | |
download | upstream-c914fa04a3cb20f3c4134c3a2c4a4caf7160edd2.tar.gz upstream-c914fa04a3cb20f3c4134c3a2c4a4caf7160edd2.tar.bz2 upstream-c914fa04a3cb20f3c4134c3a2c4a4caf7160edd2.zip |
dnsmasq: use ubus signalling in ntp hotplug script
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>
Diffstat (limited to 'package')
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasqsec.hotplug | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasqsec.hotplug b/package/network/services/dnsmasq/files/dnsmasqsec.hotplug index 5c69314bd9..a155eb0f6e 100644 --- a/package/network/services/dnsmasq/files/dnsmasqsec.hotplug +++ b/package/network/services/dnsmasq/files/dnsmasqsec.hotplug @@ -1,5 +1,7 @@ #!/bin/sh +. /lib/functions/procd.sh + TIMEVALIDFILE="/var/state/dnsmasqsec" [ "$ACTION" = stratum ] || exit 0 @@ -7,8 +9,6 @@ TIMEVALIDFILE="/var/state/dnsmasqsec" [ -f "$TIMEVALIDFILE" ] || { echo "ntpd says time is valid" >$TIMEVALIDFILE /etc/init.d/dnsmasq enabled && { - pid=$(pidof dnsmasq) - [ "$(readlink /proc/$pid/exe)" = "/usr/sbin/dnsmasq" ] && kill -SIGHUP $pid \ - || /etc/init.d/dnsmasq restart + procd_send_signal dnsmasq } } |