1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00

Fix DNS resolvers not being parsed properly

This commit is contained in:
Alexandre Aubin 2021-10-18 00:04:14 +02:00
parent 2ea83a9ce1
commit fdce1dd305

View file

@ -308,7 +308,7 @@ if [ "$1" != restart ]; then
for i in $(seq 0 $((${ynh_multissid} - 1))); do for i in $(seq 0 $((${ynh_multissid} - 1))); do
ynh_ip6_dns[${i}]="" ynh_ip6_dns[${i}]=""
ynh_ip4_dns[${i}]="" ynh_ip4_dns[${i}]=""
for ip in ; do for ip in $(echo "${ynh_dns[${i}]}" | tr ',' ' '); do
if [[ "$ip" == *":"* ]] if [[ "$ip" == *":"* ]]
then then
ynh_ip6_dns[${i}]+="[$ip]," ynh_ip6_dns[${i}]+="[$ip],"
@ -316,8 +316,9 @@ if [ "$1" != restart ]; then
ynh_ip4_dns[${i}]+="$ip," ynh_ip4_dns[${i}]+="$ip,"
fi fi
done done
ynh_ip6_dns[${i}]="${ynh_ip6_dns[${i}]%%*,}" # Remove trailing ,
ynh_ip4_dns[${i}]="${ynh_ip4_dns[${i}]%%*,}" ynh_ip6_dns[${i}]="${ynh_ip6_dns[${i}]%%,}"
ynh_ip4_dns[${i}]="${ynh_ip4_dns[${i}]%%,}"
done done
old_internet_device=$(ynh_setting_get hotspot internet_device) old_internet_device=$(ynh_setting_get hotspot internet_device)