From d34d953efbc93e3d3e4547e3d8585a35c1eb8751 Mon Sep 17 00:00:00 2001 From: bourreP Date: Tue, 22 Jan 2019 17:49:19 +0100 Subject: [PATCH] Fix #37 for post_domain_add --- hooks/post_domain_add | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/post_domain_add b/hooks/post_domain_add index 2dda9e7..5408de9 100644 --- a/hooks/post_domain_add +++ b/hooks/post_domain_add @@ -3,7 +3,7 @@ domain=$1 # Trouve l'interface réseau par défaut -main_iface=$(route | grep default | awk '{print $8;}' | head -n1) +main_iface=$(route | grep --max-count=1 default | awk '{print $8;}' | head -n1) # Trouve l'ipv4 associée à l'interface trouvée localipv4=$(ifconfig | grep -A 1 "$main_iface" | tail -1 | awk '{print $2;}' | cut -d: -f2)