openwrtv3/package/network/services/odhcpd/files/odhcpd-update
Hans Dedecker a7c2310278 odhcpd: Fix dnsmasq re-reading hostfile
Depending on the dhcp uci config pidof dnsmasq can return
multiple pids. Fix re-reading of the hostfile by dnsmasq in
such case by sending SIGHUP signal to each of the returned
pids.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-12-13 23:32:57 +01:00

8 lines
160 B
Bash
Executable file

#!/bin/sh
# Make dnsmasq reread hostfile
pid=$(pidof dnsmasq)
for i in $pid; do
[ "$(readlink /proc/$i/exe)" = "/usr/sbin/dnsmasq" ] && kill -SIGHUP $i
done