Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pi-hole/pi-hole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <ckoenig@posteo.de>2022-09-25 19:16:20 +0300
committerChristian König <ckoenig@posteo.de>2022-09-26 23:55:34 +0300
commit25ba68104b1b9c6300d45920514a06c1cccdb516 (patch)
tree9c5ca0fefb83fbed1d8fb48f94ab12ffc5048551
parent3d01e4d0cfffbfe61c03d4591ac9020917e9cada (diff)
Remove last traces
Signed-off-by: Christian König <ckoenig@posteo.de>
-rwxr-xr-xadvanced/Scripts/chronometer.sh4
-rwxr-xr-xadvanced/Scripts/piholeDebug.sh2
-rwxr-xr-xadvanced/Scripts/utils.sh5
3 files changed, 4 insertions, 7 deletions
diff --git a/advanced/Scripts/chronometer.sh b/advanced/Scripts/chronometer.sh
index af007994..d69a56d3 100755
--- a/advanced/Scripts/chronometer.sh
+++ b/advanced/Scripts/chronometer.sh
@@ -14,7 +14,9 @@ LC_NUMERIC=C
# Retrieve stats from FTL engine
pihole-FTL() {
local ftl_port LINE
- ftl_port=$(cat /run/pihole-FTL.port 2> /dev/null)
+ # shellcheck disable=SC1091
+ . /opt/pihole/utils.sh
+ ftl_port=$(getFTLAPIPort)
if [[ -n "$ftl_port" ]]; then
# Open connection to FTL
exec 3<>"/dev/tcp/127.0.0.1/$ftl_port"
diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh
index 91e16850..dbf56709 100755
--- a/advanced/Scripts/piholeDebug.sh
+++ b/advanced/Scripts/piholeDebug.sh
@@ -126,7 +126,6 @@ PIHOLE_COMMAND="${BIN_DIRECTORY}/pihole"
PIHOLE_COLTABLE_FILE="${BIN_DIRECTORY}/COL_TABLE"
FTL_PID="${RUN_DIRECTORY}/pihole-FTL.pid"
-FTL_PORT="${RUN_DIRECTORY}/pihole-FTL.port"
PIHOLE_LOG="${LOG_DIRECTORY}/pihole.log"
PIHOLE_LOG_GZIPS="${LOG_DIRECTORY}/pihole.log.[0-9].*"
@@ -155,7 +154,6 @@ REQUIRED_FILES=("${PIHOLE_CRON_FILE}"
"${PIHOLE_COMMAND}"
"${PIHOLE_COLTABLE_FILE}"
"${FTL_PID}"
-"${FTL_PORT}"
"${PIHOLE_LOG}"
"${PIHOLE_LOG_GZIPS}"
"${PIHOLE_DEBUG_LOG}"
diff --git a/advanced/Scripts/utils.sh b/advanced/Scripts/utils.sh
index 511dfc13..ef7ad219 100755
--- a/advanced/Scripts/utils.sh
+++ b/advanced/Scripts/utils.sh
@@ -73,10 +73,7 @@ removeKey() {
#######################
# returns FTL's current telnet API port based on the setting in /etc/pihole-FTL.conf
-#
-# Takes one argument: path to pihole-FTL.port
-# Example getFTLAPIPort "/run/pihole-FTL.port"
-#######################
+########################
getFTLAPIPort(){
local FTLCONFFILE="/etc/pihole/pihole-FTL.conf"
local DEFAULT_FTL_PORT=4711