Browse Source

odhcpd: Use procd_send_signal in odhcpd-update file

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 <[email protected]>
Hans Dedecker 9 years ago
parent
commit
00dbfa1764
1 changed files with 3 additions and 5 deletions
  1. 3 5
      package/network/services/odhcpd/files/odhcpd-update

+ 3 - 5
package/network/services/odhcpd/files/odhcpd-update

@@ -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