1
0
Fork 0
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:
OniriCorpe 2023-12-28 07:03:57 +01:00
parent fd75e1c9e5
commit 4c6de3701c
4 changed files with 8 additions and 5 deletions

View file

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

View file

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

View file

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

View file

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