mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
fix empty ports on some systems
Signed-off-by: Jacob Salmela <jacob.salmela@pi-hole.net>
This commit is contained in:
parent
d31a498e6c
commit
143e75d213
1 changed files with 1 additions and 1 deletions
|
@ -652,7 +652,7 @@ check_required_ports() {
|
|||
# Sort the addresses and remove duplicates
|
||||
while IFS= read -r line; do
|
||||
ports_in_use+=( "$line" )
|
||||
done < <( lsof -i -P -n | awk -F' ' '/LISTEN/ {print $9, $1}' | sort -n | uniq | cut -d':' -f2 )
|
||||
done < <( lsof -i -P -n | awk -F' ' '/LISTEN/ {print $1, $9}' | sort -n | tr -d '[*]\r' | uniq | awk '{print $2, $1}' )
|
||||
|
||||
# Now that we have the values stored,
|
||||
for i in "${!ports_in_use[@]}"; do
|
||||
|
|
Loading…
Reference in a new issue