mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-07-30 17:14:16 +02:00
Use RTMIN value provided by FTL when possible (#6358)
In some cases `kill -RTMIN` can send incorrect signal value to the FTL causing it to terminate instead of performing lists reload. https://github.com/pi-hole/FTL/issues/2573
This commit is contained in:
commit
4bea9a1d12
7
pihole
7
pihole
@ -150,7 +150,7 @@ versionFunc() {
|
||||
}
|
||||
|
||||
reloadDNS() {
|
||||
local svcOption svc str output status pid icon FTL_PID_FILE
|
||||
local svcOption svc str output status pid icon FTL_PID_FILE sigrtmin
|
||||
svcOption="${1:-reload}"
|
||||
|
||||
# get the current path to the pihole-FTL.pid
|
||||
@ -169,7 +169,10 @@ reloadDNS() {
|
||||
str="FTL is not running"
|
||||
icon="${INFO}"
|
||||
else
|
||||
svc="kill -RTMIN ${pid}"
|
||||
sigrtmin="$(pihole-FTL sigrtmin 2>/dev/null)"
|
||||
# Make sure sigrtmin is a number, otherwise fallback to RTMIN
|
||||
[[ "${sigrtmin}" =~ ^[0-9]+$ ]] || unset sigrtmin
|
||||
svc="kill -${sigrtmin:-RTMIN} ${pid}"
|
||||
str="Reloading DNS lists"
|
||||
icon="${TICK}"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user