odhcpd: Use procd_send_signal in odhcpd-update file
[openwrt/openwrt.git] / 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