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:
Dan Schaper 2025-07-20 18:06:00 -07:00 committed by GitHub
commit 4bea9a1d12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

7
pihole
View File

@ -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