From 8f7d75f5ffd61f6e435a419697f451d86c8253be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Wed, 23 Mar 2016 13:22:53 +0100 Subject: [PATCH] [fix] Don't fail dnsmasq regen if IPv4/6 cannot be retrieved --- data/hooks/conf_regen/43-dnsmasq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/hooks/conf_regen/43-dnsmasq b/data/hooks/conf_regen/43-dnsmasq index 49c303994..683747adb 100644 --- a/data/hooks/conf_regen/43-dnsmasq +++ b/data/hooks/conf_regen/43-dnsmasq @@ -17,11 +17,11 @@ function safe_copy () { cd /usr/share/yunohost/templates/dnsmasq # Get IPv4 address -ip=$(curl -s -4 https://ip.yunohost.org 2>/dev/null) +ip=$(curl -s -4 https://ip.yunohost.org 2>/dev/null || true) ynh_validate_ip4 $ip || ip='0.0.0.0' # Get IPv6 IP address -ipv6=$(curl -s -6 http://ip6.yunohost.org 2>/dev/null) +ipv6=$(curl -s -6 http://ip6.yunohost.org 2>/dev/null || true) ynh_validate_ip6 $ipv6 || ipv6='' sudo mkdir -p /etc/dnsmasq.d