From 642090415c4077813fb887fa53556021068102cc Mon Sep 17 00:00:00 2001 From: "theo@manjaro" Date: Wed, 29 Jun 2022 16:00:15 +0200 Subject: [PATCH] Fixed default value for IPv4 --- hooks/conf_regen/43-dnsmasq | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/conf_regen/43-dnsmasq b/hooks/conf_regen/43-dnsmasq index a0f87dcee..bd97827b1 100755 --- a/hooks/conf_regen/43-dnsmasq +++ b/hooks/conf_regen/43-dnsmasq @@ -24,7 +24,7 @@ do_pre_regen() { ###### IPV4 ####### - ipv4=$(yunohost tools shell -c "from yunohost.utils.network import get_public_ips;print(get_public_ips(4)[0])") + ipv4=$(yunohost tools shell -c "from yunohost.utils.network import get_public_ips;ips=get_public_ips(4);print(ips[0] if len(ips)>0 else '127.0.0.1')") ###### IPV6 #######