mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
regenconf: add a timeout to curl inside dnsmasq regenconf to prevent being stuck too long when no network on the machine
This commit is contained in:
parent
e1cbe21cd1
commit
b77e811402
1 changed files with 2 additions and 2 deletions
|
@ -21,9 +21,9 @@ do_pre_regen() {
|
|||
cat plain/resolv.dnsmasq.conf | grep "^nameserver" | shuf >${pending_dir}/etc/resolv.dnsmasq.conf
|
||||
|
||||
# retrieve variables
|
||||
ipv4=$(curl -s -4 https://ip.yunohost.org 2>/dev/null || true)
|
||||
ipv4=$(curl --max-time 10 -s -4 https://ip.yunohost.org 2>/dev/null || true)
|
||||
ynh_validate_ip4 "$ipv4" || ipv4='127.0.0.1'
|
||||
ipv6=$(curl -s -6 https://ip6.yunohost.org 2>/dev/null || true)
|
||||
ipv6=$(curl --max-time 10 -s -6 https://ip6.yunohost.org 2>/dev/null || true)
|
||||
ynh_validate_ip6 "$ipv6" || ipv6=''
|
||||
interfaces="$(ip -j addr show | jq -r '[.[].ifname]|join(" ")')"
|
||||
wireless_interfaces="lo"
|
||||
|
|
Loading…
Add table
Reference in a new issue