mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-24 00:00:14 +00:00
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:
parent
15d7fab2cb
commit
2c32d485bd
6 changed files with 9 additions and 60 deletions
|
@ -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
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue