From 160c47defee2dbd2dbb1511424f60bc975f2e123 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 1 Dec 2020 19:48:59 +0000 Subject: [PATCH] Create network.json + RASPI_CONFIG_NETWORK --- config/config.php | 2 +- config/network.json | 15 +++++++++++++++ includes/defaults.php | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 config/network.json diff --git a/config/config.php b/config/config.php index 04fb56bc..790338fc 100755 --- a/config/config.php +++ b/config/config.php @@ -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'); diff --git a/config/network.json b/config/network.json new file mode 100644 index 00000000..5de32e81 --- /dev/null +++ b/config/network.json @@ -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" ] + } +} + diff --git a/includes/defaults.php b/includes/defaults.php index ce1b4731..022b5347 100755 --- a/includes/defaults.php +++ b/includes/defaults.php @@ -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',