Create network.json + RASPI_CONFIG_NETWORK

This commit is contained in:
billz 2020-12-01 19:48:59 +00:00
parent b09d61619a
commit 160c47defe
3 changed files with 17 additions and 2 deletions

View file

@ -2,7 +2,7 @@
define('RASPI_BRAND_TEXT', 'RaspAP');
define('RASPI_CONFIG', '/etc/raspap');
define('RASPI_CONFIG_NETWORKING', RASPI_CONFIG.'/networking');
define('RASPI_CONFIG_NETWORK', RASPI_CONFIG.'/networking/network.json');
define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth');
define('RASPI_WIFI_AP_INTERFACE', 'wlan0');
define('RASPI_CACHE_PATH', sys_get_temp_dir() . '/raspap');

15
config/network.json Normal file
View file

@ -0,0 +1,15 @@
{
"wlan0": {
"static ip_address": [ "10.3.141.1/24" ],
"static routers": [ "10.3.141.1" ],
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
"dhcp-range": [ "10.3.141.50,10.3.141.255,255.255.255.0,12h" ]
},
"uap0": {
"static ip_address": [ "192.168.50.1/24" ],
"static routers": [ "192.168.50.1" ],
"static domain_name_server": [ "1.1.1.1 8.8.8.8" ],
"dhcp-range": [ "192.168.50.50,192.168.50.150,12h" ]
}
}

View file

@ -7,7 +7,7 @@ if (!defined('RASPI_CONFIG')) {
$defaults = [
'RASPI_BRAND_TEXT' => 'RaspAP',
'RASPI_VERSION' => '2.5.1',
'RASPI_CONFIG_NETWORKING' => RASPI_CONFIG.'/networking',
'RASPI_CONFIG_NETWORK' => RASPI_CONFIG.'/networking/network.json',
'RASPI_ADMIN_DETAILS' => RASPI_CONFIG.'/raspap.auth',
'RASPI_WIFI_AP_INTERFACE' => 'wlan0',
'RASPI_CACHE_PATH' => sys_get_temp_dir() . '/raspap',