mirror of https://github.com/aredn/aredn.git
Improve the way we HUP dnsmasq (#953)
This commit is contained in:
parent
a2e9e3054c
commit
880a4f195a
|
@ -149,10 +149,10 @@ end
|
||||||
function dns_update(reload)
|
function dns_update(reload)
|
||||||
if reload then
|
if reload then
|
||||||
os.execute("/etc/init.d/dnsmasq restart")
|
os.execute("/etc/init.d/dnsmasq restart")
|
||||||
else
|
elseif nixio.fs.stat("/var/run/dnsmasq/dnsmasq.pid") then
|
||||||
local pid = capture("pidof dnsmasq")
|
local pid = tonumber(read_all("/var/run/dnsmasq/dnsmasq.pid"))
|
||||||
if pid ~= "" then
|
if pid then
|
||||||
nixio.kill(tonumber(pid), 1)
|
nixio.kill(pid, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue