From 42381a2aefb3e2628af9349fdbfa866299fafc72 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Tue, 3 Oct 2017 12:46:02 +0800 Subject: [PATCH] Updating dashboard to use ip rather than ifconfig --- includes/dashboard.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/dashboard.php b/includes/dashboard.php index 6a40c4c2..e05ea0d4 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -54,14 +54,14 @@ function DisplayDashboard(){ if( isset($_POST['ifdown_wlan0']) ) { exec( 'ifconfig wlan0 | grep -i running | wc -l',$test ); if($test[0] == 1) { - exec( 'sudo ifdown wlan0',$return ); + exec( 'sudo ip link set wlan0 down',$return ); } else { echo 'Interface already down'; } } elseif( isset($_POST['ifup_wlan0']) ) { exec( 'ifconfig wlan0 | grep -i running | wc -l',$test ); if($test[0] == 0) { - exec( 'sudo ifup wlan0',$return ); + exec( 'sudo ip link set wlan0 up',$return ); } else { echo 'Interface already up'; } @@ -134,7 +134,7 @@ function DisplayDashboard(){ -