mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 22:00:17 +00:00
Repetitive ip route get
was resetting counts.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
a713cf7952
commit
a299a2cc5f
1 changed files with 6 additions and 3 deletions
|
@ -168,10 +168,13 @@ getGitFiles() {
|
|||
}
|
||||
|
||||
find_IPv4_information() {
|
||||
local route
|
||||
# Find IP used to route to outside world
|
||||
IPv4dev=$(ip route get 8.8.8.8 | awk '{for(i=1;i<=NF;i++)if($i~/dev/)print $(i+1)}')
|
||||
IPV4_ADDRESS=$(ip route get 8.8.8.8| awk '{print $7}')
|
||||
IPv4gw=$(ip route get 8.8.8.8 | awk '{print $3}')
|
||||
route=$(ip route get 8.8.8.8)
|
||||
IPv4dev=$(awk '{for (i=1; i<=NF; i++) if ($i~/dev/) print $(i+1)}' <<< "${route}")
|
||||
IPV4_ADDRESS=$(awk '{print $7}' <<< "${route}")
|
||||
IPv4gw=$(awk '{print $3}' <<< "${route}")
|
||||
|
||||
}
|
||||
|
||||
get_available_interfaces() {
|
||||
|
|
Loading…
Reference in a new issue