Changed variable name

This commit is contained in:
theo@manjaro 2022-06-29 09:39:05 +02:00
parent 19482d0b96
commit 331ca32eff

View file

@ -29,24 +29,24 @@ do_pre_regen() {
###### IPV4 ####### ###### IPV4 #######
trouve=0 foundip=0
for link in "${ip_yuno[@]}" ; do for link in "${ip_yuno[@]}" ; do
if [ $(curl --connect-timeout 5 -o -I -L -s -w "%{http_code}" "$link" 2> /dev/null) -eq 200 ] && [ $trouve -ne 1 ]; then if [ $(curl --connect-timeout 5 -o -I -L -s -w "%{http_code}" "$link" 2> /dev/null) -eq 200 ] && [ $foundip -ne 1 ]; then
ipv4=$(curl -s -4 "$link" 2>/dev/null || true) ipv4=$(curl -s -4 "$link" 2>/dev/null || true)
ynh_validate_ip4 "$ipv4" || ipv4='127.0.0.1' ynh_validate_ip4 "$ipv4" || ipv4='127.0.0.1'
trouve=1 foundip=1
fi fi
done done
###### IPV6 ####### ###### IPV6 #######
trouve=0 foundip=0
for i in "${!ip_yuno6[@]}" ; do for i in "${!ip_yuno6[@]}" ; do
if [ $(curl --connect-timeout 5 -o -I -L -s -w "%{http_code}" "${ip6_yuno[$i]}" 2> /dev/null) -eq 200 ] && [ $trouve -ne 1 ]; then if [ $(curl --connect-timeout 5 -o -I -L -s -w "%{http_code}" "${ip6_yuno[$i]}" 2> /dev/null) -eq 200 ] && [ $foundip -ne 1 ]; then
ipv6=$(curl -s -6 "${ip_yuno6[$i]}" 2>/dev/null || true) ipv6=$(curl -s -6 "${ip_yuno6[$i]}" 2>/dev/null || true)
ynh_validate_ip6 "$ipv6" || ipv6='' ynh_validate_ip6 "$ipv6" || ipv6=''
trouve=1 foundip=1
fi fi
done done