mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Analyse port also on ports other than 53
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
2b52f92647
commit
bcb59159ed
8
pihole
8
pihole
@ -325,7 +325,7 @@ statusFunc() {
|
|||||||
else
|
else
|
||||||
#get the port pihole-FTL is listening on by using FTL's telnet API
|
#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)"
|
port="$(echo ">dns-port >quit" | nc 127.0.0.1 4711)"
|
||||||
listening="$(lsof -Pni:53)"
|
listening="$(lsof -Pni:${port})"
|
||||||
if [[ "${port}" == "0" ]]; then
|
if [[ "${port}" == "0" ]]; then
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
"web") echo "-1";;
|
"web") echo "-1";;
|
||||||
@ -333,7 +333,8 @@ statusFunc() {
|
|||||||
esac
|
esac
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
if [[ "${1}" != "web" ]] && [[ "$port" -eq 53 ]]; then
|
if [[ "${1}" != "web" ]]; then
|
||||||
|
echo -e " ${TICK} FTL is listening on port ${port}"
|
||||||
analyze_ports "${listening}"
|
analyze_ports "${listening}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -350,8 +351,7 @@ statusFunc() {
|
|||||||
# Configs are set
|
# Configs are set
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
"web") echo "$port";;
|
"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
|
esac
|
||||||
else
|
else
|
||||||
# No configs were found
|
# No configs were found
|
||||||
|
Loading…
Reference in New Issue
Block a user