trim the shell output

This commit is contained in:
2021-11-30 13:10:38 -05:00
parent a9538d1ea3
commit 23ad1c01d3

View File

@@ -73,9 +73,8 @@ $wanIP = $ifcfg['details']['ipv4'][0]['ipaddr'];
$wanSubnet = $ifcfg['details']['ipv4'][0]['subnetbits'];
printf("WAN DHCP IP: %s \n", $wanIP);
printf("WAN DHCP Sbunet Bits: %s \n", $wanSubnet);
$gatewayIP = shell_exec('netstat -rn | grep default | awk \'{print $2;}\'');
$gatewayIP = trim(shell_exec('netstat -rn | grep default | awk \'{print $2;}\''));
printf("Gateway IP: %s \n", $gatewayIP);
printf("Done getting DHCP and Gateway IP Addresses. \n");
/*
# Config for WAN Static