mirror of
https://github.com/YunoHost-Apps/adguardhome_ynh.git
synced 2024-09-03 18:06:23 +02:00
put back the comment note about echo & add comment
This commit is contained in:
parent
b95d192aa6
commit
fdc0d03874
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,8 @@
|
||||||
configure_network_interface_dnsmasq(){
|
configure_network_interface_dnsmasq(){
|
||||||
# used to put the network interface in a dedicated dnsmasq config
|
# used to put the network interface in a dedicated dnsmasq config
|
||||||
|
|
||||||
|
# get the network interface name for IPv4 and IPv6
|
||||||
|
# note: echo the IP route command to prevent a crash if the server doesn't have any IPv4/6
|
||||||
ipv4_interface=$(echo "$(ip -4 route get 1.2.3.4 2> /dev/null)" | head -n1 | grep -oP '(?<=dev )\w+' || true)
|
ipv4_interface=$(echo "$(ip -4 route get 1.2.3.4 2> /dev/null)" | head -n1 | grep -oP '(?<=dev )\w+' || true)
|
||||||
ipv6_interface=$(echo "$(ip -6 route get ::1.2.3.4 2> /dev/null)" | head -n1 | grep -oP '(?<=dev )\w+' || true)
|
ipv6_interface=$(echo "$(ip -6 route get ::1.2.3.4 2> /dev/null)" | head -n1 | grep -oP '(?<=dev )\w+' || true)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue