Use ip route rather than old net-tools route in chronometer.sh

The only use of net-tools is the use of route in chronometer.sh so
instead use the same method as used in piholeDebug.sh to get the
default gateway so there's no need to depend on net-tools anylonger.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
This commit is contained in:
Peter Robinson 2018-07-26 17:46:51 +01:00
parent 384b588a2d
commit 45521b377a
2 changed files with 2 additions and 2 deletions

View file

@ -243,7 +243,7 @@ get_sys_stats() {
disk_total="${disk_raw[1]}"
disk_perc="${disk_raw[2]}"
net_gateway=$(route -n | awk '$4 == "UG" {print $2;exit}')
net_gateway=$(ip route | grep default | cut -d ' ' -f 3)
# Get DHCP stats, if feature is enabled
if [[ "$DHCP_ACTIVE" == "true" ]]; then