Explorar o código

Merge pull request #38 from kay0u/patch-1

Fix #37 for post_domain_add
Maniack Crudelis %!s(int64=7) %!d(string=hai) anos
pai
achega
4f6c39c8b1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      hooks/post_domain_add

+ 1 - 1
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)