Remove obsolet getFTLPIDFile()

We can get the path of the PID file via getFTLConfigValue files.pid

Signed-off-by: Christian König <github@yubiuser.dev>
This commit is contained in:
Christian König 2024-07-27 21:55:18 +02:00
parent 15d7fab2cb
commit 2c32d485bd
No known key found for this signature in database
6 changed files with 9 additions and 60 deletions

View file

@ -81,25 +81,6 @@ removeKey() {
sed -i "/^${key}/d" "${file}"
}
#######################
# returns path of FTL's PID file
#######################
getFTLPIDFile() {
local FTLCONFFILE="/etc/pihole/pihole-FTL.conf"
local DEFAULT_PID_FILE="/run/pihole-FTL.pid"
local FTL_PID_FILE
if [ -s "${FTLCONFFILE}" ]; then
# if PIDFILE is not set in pihole-FTL.conf, use the default path
FTL_PID_FILE="$({ grep '^PIDFILE=' "${FTLCONFFILE}" || echo "${DEFAULT_PID_FILE}"; } | cut -d'=' -f2-)"
else
# if there is no pihole-FTL.conf, use the default path
FTL_PID_FILE="${DEFAULT_PID_FILE}"
fi
echo "${FTL_PID_FILE}"
}
#######################
# returns FTL's PID based on the content of the pihole-FTL.pid file
#