mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-10 15:03:07 +00:00
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>
9 lines
160 B
Bash
Executable File
9 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
|