odhcpd: Use procd_send_signal in odhcpd-update file
authorHans Dedecker <dedeckeh@gmail.com>
Tue, 20 Dec 2016 21:13:40 +0000 (22:13 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Wed, 21 Dec 2016 19:35:49 +0000 (20:35 +0100)
Let dnsmasq reread the leasefile by using procd_send_signal
which triggers procd to send SIGHUP kill signal by default
if signal is not specified

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/services/odhcpd/files/odhcpd-update

index 5f800aac60a882bc9284491cda21c465b7a71abf..9bc7abcc1c3a85c77a3e8b791393768f7afec570 100755 (executable)
@@ -1,8 +1,6 @@
 #!/bin/sh
-# Make dnsmasq reread hostfile
+# Make dnsmasq reread hostfile by sending SIGHUP signal
 
-pid=$(pidof dnsmasq)
+. $IPKG_INSTROOT/lib/functions/procd.sh
 
-for i in $pid; do
-       [ "$(readlink /proc/$i/exe)" = "/usr/sbin/dnsmasq" ] && kill -SIGHUP $i
-done
+procd_send_signal dnsmasq