mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Changed variable name
This commit is contained in:
parent
19482d0b96
commit
331ca32eff
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue