Renamed constant for consistency

This commit is contained in:
billz 2021-08-05 20:29:46 +01:00
parent 307256d96e
commit 9405297662
2 changed files with 9 additions and 9 deletions

View file

@ -23,14 +23,14 @@ define('RASPI_OPENVPN_CLIENT_CONFIG', '/etc/openvpn/client/client.conf');
define('RASPI_OPENVPN_CLIENT_LOGIN', '/etc/openvpn/client/login.conf'); define('RASPI_OPENVPN_CLIENT_LOGIN', '/etc/openvpn/client/login.conf');
define('RASPI_WIREGUARD_PATH', '/etc/wireguard/'); define('RASPI_WIREGUARD_PATH', '/etc/wireguard/');
define('RASPI_WIREGUARD_CONFIG', RASPI_WIREGUARD_PATH.'wg0.conf'); define('RASPI_WIREGUARD_CONFIG', RASPI_WIREGUARD_PATH.'wg0.conf');
define('RASPAP_FIREWALL_CONF',"/etc/raspap/networking/firewall/firewall.conf"); define('RASPI_FIREWALL_CONF', RASPI_CONFIG.'/networking/firewall/firewall.conf');
define('RASPAP_IPTABLES_CONF',"/etc/raspap/networking/firewall/iptables_rules.json"); define('RASPI_IPTABLES_CONF', RASPI_CONFIG.'/networking/firewall/iptables_rules.json');
define('RASPI_TORPROXY_CONFIG', '/etc/tor/torrc'); define('RASPI_TORPROXY_CONFIG', '/etc/tor/torrc');
define('RASPI_LIGHTTPD_CONFIG', '/etc/lighttpd/lighttpd.conf'); define('RASPI_LIGHTTPD_CONFIG', '/etc/lighttpd/lighttpd.conf');
define('RASPI_ACCESS_CHECK_IP', '1.1.1.1'); define('RASPI_ACCESS_CHECK_IP', '1.1.1.1');
define('RASPI_ACCESS_CHECK_DNS', 'one.one.one.one'); define('RASPI_ACCESS_CHECK_DNS', 'one.one.one.one');
define('RASPI_CLIENT_CONFIG_PATH', '/etc/raspap/networking/client_udev_prototypes.json'); define('RASPI_CLIENT_CONFIG_PATH', RASPI_CONFIG.'/networking/client_udev_prototypes.json');
define('RASPI_MOBILEDATA_CONFIG', '/etc/raspap/networking/mobiledata.ini'); define('RASPI_MOBILEDATA_CONFIG', RASPI_CONFIG.'/networking/mobiledata.ini');
define('RASPI_CLIENT_SCRIPT_PATH', '/usr/local/sbin'); define('RASPI_CLIENT_SCRIPT_PATH', '/usr/local/sbin');
// Constant for the 5GHz wireless regulatory domain // Constant for the 5GHz wireless regulatory domain

View file

@ -129,7 +129,7 @@ function isIPv6(&$rule)
*/ */
function configureFirewall() function configureFirewall()
{ {
$json = file_get_contents(RASPAP_IPTABLES_CONF); $json = file_get_contents(RASPI_IPTABLES_CONF);
$ipt = json_decode($json, true); $ipt = json_decode($json, true);
$conf = ReadFirewallConf(); $conf = ReadFirewallConf();
$txt = "#!/bin/bash\n"; $txt = "#!/bin/bash\n";
@ -182,7 +182,7 @@ function configureFirewall()
function WriteFirewallConf($conf) function WriteFirewallConf($conf)
{ {
$ret = false; $ret = false;
if (is_array($conf) ) { write_php_ini($conf, RASPAP_FIREWALL_CONF); if (is_array($conf) ) { write_php_ini($conf, RASPI_FIREWALL_CONF);
} }
return $ret; return $ret;
} }
@ -193,8 +193,8 @@ function WriteFirewallConf($conf)
*/ */
function ReadFirewallConf() function ReadFirewallConf()
{ {
if (file_exists(RASPAP_FIREWALL_CONF) ) { if (file_exists(RASPI_FIREWALL_CONF) ) {
$conf = parse_ini_file(RASPAP_FIREWALL_CONF); $conf = parse_ini_file(RASPI_FIREWALL_CONF);
} else { } else {
$conf = array(); $conf = array();
$conf["firewall-enable"] = false; $conf["firewall-enable"] = false;
@ -266,7 +266,7 @@ function DisplayFirewallConfig()
$status = new StatusMessages(); $status = new StatusMessages();
$json = file_get_contents(RASPAP_IPTABLES_CONF); $json = file_get_contents(RASPI_IPTABLES_CONF);
$ipt_rules = json_decode($json, true); $ipt_rules = json_decode($json, true);
getWifiInterface(); getWifiInterface();
$ap_device = $_SESSION['ap_interface']; $ap_device = $_SESSION['ap_interface'];