1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pihole_ynh.git synced 2024-09-03 20:05:58 +02:00

Fix #37 for post_domain_add

This commit is contained in:
bourreP 2019-01-22 17:49:19 +01:00 committed by GitHub
parent 2ed3e8a81f
commit d34d953efb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)