From bcb59159ed659c7c8e2ccec8447285aede7f6845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 28 Dec 2021 19:52:11 +0100 Subject: [PATCH] Analyse port also on ports other than 53 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- pihole | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pihole b/pihole index f93da52c..a8f20b69 100755 --- a/pihole +++ b/pihole @@ -325,7 +325,7 @@ statusFunc() { else #get the port pihole-FTL is listening on by using FTL's telnet API port="$(echo ">dns-port >quit" | nc 127.0.0.1 4711)" - listening="$(lsof -Pni:53)" + listening="$(lsof -Pni:${port})" if [[ "${port}" == "0" ]]; then case "${1}" in "web") echo "-1";; @@ -333,7 +333,8 @@ statusFunc() { esac return 0 else - if [[ "${1}" != "web" ]] && [[ "$port" -eq 53 ]]; then + if [[ "${1}" != "web" ]]; then + echo -e " ${TICK} FTL is listening on port ${port}" analyze_ports "${listening}" fi fi @@ -350,8 +351,7 @@ statusFunc() { # Configs are set case "${1}" in "web") echo "$port";; - *) echo -e " ${TICK} Pi-hole blocking is enabled. FTL is listening on port ${port}" - ;; + *) echo -e " ${TICK} Pi-hole blocking is enabled";; esac else # No configs were found