mirror of
https://github.com/YunoHost-Apps/adguardhome_ynh.git
synced 2024-09-03 18:06:23 +02:00
fix process_ips()
This commit is contained in:
parent
5bec155503
commit
515b371a7d
1 changed files with 15 additions and 12 deletions
|
@ -73,8 +73,11 @@ process_ips(){
|
|||
local ips="$1"
|
||||
local processed_ips=""
|
||||
|
||||
for i in $(seq "$(echo "$ips" | wc -w)" -1 1); do
|
||||
ip=$(echo "$ips" | awk "{print \$$i}")
|
||||
# remove the 'inet6' and 'inet' from the IP
|
||||
ips="$(echo "$ips" | sed "s/inet6//g ; s/inet//g")"
|
||||
|
||||
# for each IP
|
||||
for ip in $ips; do
|
||||
# check if the so-called IP really is one
|
||||
if [ "$(ynh_validate_ip4 --ip_address="$ip")" ] || [ "$(ynh_validate_ip6 --ip_address="$ip")" ] ; then
|
||||
# don't process if the IP is public and the port 53 closed
|
||||
|
|
Loading…
Add table
Reference in a new issue