diff --git a/includes/config.php b/includes/config.php index 58033aa4..9ce3b835 100644 --- a/includes/config.php +++ b/includes/config.php @@ -3,6 +3,7 @@ define('RASPI_CONFIG', '/etc/raspap'); define('RASPI_CONFIG_NETWORKING',RASPI_CONFIG.'/networking'); define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth'); +define('RASPI_WIFI_CLIENT_INTERFACE', 'wlan0'); // Constants for configuration file paths. // These are typical for default RPi installs. Modify if needed. @@ -17,7 +18,12 @@ define('RASPI_OPENVPN_SERVER_CONFIG', '/etc/openvpn/server.conf'); define('RASPI_TORPROXY_CONFIG', '/etc/tor/torrc'); // Optional services, set to true to enable. +define('RASPI_HOTSPOT_ENABLED', true ); +define('RASPI_NETWORK_ENABLED', true ); +define('RASPI_DHCP_ENABLED', true ); define('RASPI_OPENVPN_ENABLED', false ); define('RASPI_TORPROXY_ENABLED', false ); +define('RASPI_CONFAUTH_ENABLED', true ); +define('RASPI_CHANGETHEME_ENABLED', true ); ?> diff --git a/includes/configure_client.php b/includes/configure_client.php index 4b1ede62..31a77e5e 100755 --- a/includes/configure_client.php +++ b/includes/configure_client.php @@ -134,7 +134,7 @@ function DisplayWPAConfig(){ } } - exec( 'iwconfig wlan0', $iwconfig_return ); + exec( 'iwconfig ' . RASPI_WIFI_CLIENT_INTERFACE, $iwconfig_return ); foreach ($iwconfig_return as $line) { if (preg_match( '/ESSID:\"([^"]+)\"/i',$line,$iwconfig_ssid )) { $networks[$iwconfig_ssid[1]]['connected'] = true; @@ -149,7 +149,7 @@ function DisplayWPAConfig(){

showMessages(); ?>

-

Client settings

+

Client settings for interface

Rescan
diff --git a/includes/dashboard.php b/includes/dashboard.php index f154d663..fa5820dc 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -8,8 +8,8 @@ function DisplayDashboard(){ $status = new StatusMessages(); - exec( 'ip a s wlan0', $return ); - exec( 'iwconfig wlan0', $return ); + exec( 'ip a s ' . RASPI_WIFI_CLIENT_INTERFACE , $return ); + exec( 'iwconfig ' . RASPI_WIFI_CLIENT_INTERFACE, $return ); $strWlan0 = implode( " ", $return ); $strWlan0 = preg_replace( '/\s\s+/', ' ', $strWlan0 ); @@ -58,17 +58,17 @@ function DisplayDashboard(){ } if( isset($_POST['ifdown_wlan0']) ) { - exec( 'ifconfig wlan0 | grep -i running | wc -l',$test ); + exec( 'ifconfig ' . RASPI_WIFI_CLIENT_INTERFACE . ' | grep -i running | wc -l',$test ); if($test[0] == 1) { - exec( 'sudo ip link set wlan0 down',$return ); + exec( 'sudo ip link set ' . RASPI_WIFI_CLIENT_INTERFACE . ' down',$return ); } else { echo 'Interface already down'; } } elseif( isset($_POST['ifup_wlan0']) ) { - exec( 'ifconfig wlan0 | grep -i running | wc -l',$test ); + exec( 'ifconfig ' . RASPI_WIFI_CLIENT_INTERFACE . ' | grep -i running | wc -l',$test ); if($test[0] == 0) { - exec( 'sudo ip link set wlan0 up',$return ); - exec( 'sudo ip -s a f label wlan0',$return); + 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'; } @@ -85,7 +85,7 @@ function DisplayDashboard(){

Interface Information

-
Interface Name
wlan0
+
Interface Name

IP Address

Subnet Mask

Mac Address


@@ -126,9 +126,9 @@ function DisplayDashboard(){
'; + echo ''; } else { - echo ''; + echo ''; } ?> diff --git a/includes/system.php b/includes/system.php index 213e87a8..8f8c29e3 100755 --- a/includes/system.php +++ b/includes/system.php @@ -66,7 +66,7 @@ function DisplaySystem(){ // mem used $memused_status = "primary"; - exec("free -m | awk '/Mem:/ { total=$2 } /buffers\/cache/ { used=$3 } END { print used/total*100}'", $memarray); + exec("free -m | awk '/Mem:/ { total=$2 ; used=$3 } END { print used/total*100}'", $memarray); $memused = floor($memarray[0]); if ($memused > 90) { $memused_status = "danger"; } elseif ($memused > 75) { $memused_status = "warning"; } diff --git a/index.php b/index.php index e6fc4e24..fa5ee301 100755 --- a/index.php +++ b/index.php @@ -118,15 +118,21 @@ $theme_url = 'dist/css/' . $theme;
  • Configure WiFi Client
  • +
  • Configure Hotspot
  • + +
  • Configure Networking
  • + +
  • Configure DHCP Server
  • +
  • Configure OpenVPN @@ -137,12 +143,16 @@ $theme_url = 'dist/css/' . $theme; Configure TOR proxy
  • +
  • Configure Auth
  • + +
  • Change Theme
  • +
  • System