addMessage('Interface is up', 'success'); $wlan0up = true; } else { $status->addMessage('Interface is down', 'warning'); } if( isset($_POST['ifdown_wlan0']) ) { exec( 'ifconfig ' . RASPI_WIFI_CLIENT_INTERFACE . ' | grep -i running | wc -l',$test ); if($test[0] == 1) { exec( 'sudo ip link set ' . RASPI_WIFI_CLIENT_INTERFACE . ' down',$return ); } else { echo 'Interface already down'; } } elseif( isset($_POST['ifup_wlan0']) ) { exec( 'ifconfig ' . RASPI_WIFI_CLIENT_INTERFACE . ' | grep -i running | wc -l',$test ); if($test[0] == 0) { exec( 'sudo ip link set ' . RASPI_WIFI_CLIENT_INTERFACE . ' up',$return ); exec( 'sudo ip -s a f label ' . RASPI_WIFI_CLIENT_INTERFACE,$return); } else { echo 'Interface already up'; } } ?>

showMessages(); ?>


















%
'; } else { echo ''; } ?> " onclick="document.location.reload(true)" />