mirror of
https://github.com/YunoHost-Apps/adguardhome_ynh.git
synced 2024-09-03 18:06:23 +02:00
fix ipv4 getting
This commit is contained in:
parent
fd75e1c9e5
commit
4c6de3701c
4 changed files with 8 additions and 5 deletions
|
@ -38,8 +38,8 @@ set__open_port_53() {
|
|||
ipv4_interface="$(get_network_interface 4)"
|
||||
ipv6_interface="$(get_network_interface 6)"
|
||||
|
||||
# get IPv4 for the AGH config file
|
||||
ipv4_addr=$(process_ips "$(ip -4 address show "$ipv4_interface" 2> /dev/null | grep inet)")
|
||||
# the 'sed' is used to get rid of the network prefix ('/24' for example) and the router IP
|
||||
ipv4_addr=$(process_ips "$(ip -4 address show "$ipv4_interface" 2> /dev/null | grep inet | sed 's&/.*&&')")
|
||||
|
||||
# get IPv6 for the AGH config file
|
||||
# the 'sed' is used to get rid of the network prefix ('/64' for example)
|
||||
|
|
|
@ -87,7 +87,8 @@ configure_network_interface_dnsmasq "$ipv4_interface" "$ipv6_interface"
|
|||
# to warn process_ips that we're doing an installation (to get a dash before each IP)
|
||||
is_install=true
|
||||
# get IPv4 for the AGH config file
|
||||
ipv4_addr=$(process_ips "$(ip -4 address show "$ipv4_interface" 2> /dev/null | grep inet)")
|
||||
# the 'sed' is used to get rid of the network prefix ('/24' for example) and the router IP
|
||||
ipv4_addr=$(process_ips "$(ip -4 address show "$ipv4_interface" 2> /dev/null | grep inet | sed 's&/.*&&')")
|
||||
|
||||
# get IPv6 for the AGH config file
|
||||
# the 'sed' is used to get rid of the network prefix ('/64' for example)
|
||||
|
|
|
@ -52,7 +52,8 @@ ipv6_interface="$(get_network_interface 6)"
|
|||
configure_network_interface_dnsmasq "$ipv4_interface" "$ipv6_interface"
|
||||
|
||||
# get IPv4 for the AGH config file
|
||||
ipv4_addr=$(process_ips "$(ip -4 address show "$ipv4_interface" 2> /dev/null | grep inet)")
|
||||
# the 'sed' is used to get rid of the network prefix ('/24' for example) and the router IP
|
||||
ipv4_addr=$(process_ips "$(ip -4 address show "$ipv4_interface" 2> /dev/null | grep inet | sed 's&/.*&&')")
|
||||
|
||||
# get IPv6 for the AGH config file
|
||||
# the 'sed' is used to get rid of the network prefix ('/64' for example)
|
||||
|
|
|
@ -129,7 +129,8 @@ ipv4_interface="$(get_network_interface 4)"
|
|||
ipv6_interface="$(get_network_interface 6)"
|
||||
|
||||
# get IPv4 for the AGH config file
|
||||
ipv4_addr=$(process_ips "$(ip -4 address show "$ipv4_interface" 2> /dev/null | grep inet)")
|
||||
# the 'sed' is used to get rid of the network prefix ('/24' for example) and the router IP
|
||||
ipv4_addr=$(process_ips "$(ip -4 address show "$ipv4_interface" 2> /dev/null | grep inet | sed 's&/.*&&')")
|
||||
|
||||
# get IPv6 for the AGH config file
|
||||
# the 'sed' is used to get rid of the network prefix ('/64' for example)
|
||||
|
|
Loading…
Add table
Reference in a new issue