trim the shell output
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user