소스 검색

Merge pull request #38 from kay0u/patch-1

Fix #37 for post_domain_add
Maniack Crudelis 7 년 전
부모
커밋
4f6c39c8b1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      hooks/post_domain_add

+ 1 - 1
hooks/post_domain_add

@@ -3,7 +3,7 @@
 domain=$1
 domain=$1
 
 
 # Trouve l'interface réseau par défaut
 # 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
 # Trouve l'ipv4 associée à l'interface trouvée
 localipv4=$(ifconfig | grep -A 1 "$main_iface" | tail -1 | awk '{print $2;}' | cut -d: -f2)
 localipv4=$(ifconfig | grep -A 1 "$main_iface" | tail -1 | awk '{print $2;}' | cut -d: -f2)