a7c2310278
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>
8 lines
160 B
Bash
Executable file
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
|