diff --git a/config/config.php b/config/config.php index 997a3990..ab3cebb4 100755 --- a/config/config.php +++ b/config/config.php @@ -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_WIREGUARD_PATH', '/etc/wireguard/'); define('RASPI_WIREGUARD_CONFIG', RASPI_WIREGUARD_PATH.'wg0.conf'); -define('RASPAP_FIREWALL_CONF',"/etc/raspap/networking/firewall/firewall.conf"); -define('RASPAP_IPTABLES_CONF',"/etc/raspap/networking/firewall/iptables_rules.json"); +define('RASPI_FIREWALL_CONF', RASPI_CONFIG.'/networking/firewall/firewall.conf'); +define('RASPI_IPTABLES_CONF', RASPI_CONFIG.'/networking/firewall/iptables_rules.json'); define('RASPI_TORPROXY_CONFIG', '/etc/tor/torrc'); define('RASPI_LIGHTTPD_CONFIG', '/etc/lighttpd/lighttpd.conf'); define('RASPI_ACCESS_CHECK_IP', '1.1.1.1'); define('RASPI_ACCESS_CHECK_DNS', 'one.one.one.one'); -define('RASPI_CLIENT_CONFIG_PATH', '/etc/raspap/networking/client_udev_prototypes.json'); -define('RASPI_MOBILEDATA_CONFIG', '/etc/raspap/networking/mobiledata.ini'); +define('RASPI_CLIENT_CONFIG_PATH', RASPI_CONFIG.'/networking/client_udev_prototypes.json'); +define('RASPI_MOBILEDATA_CONFIG', RASPI_CONFIG.'/networking/mobiledata.ini'); define('RASPI_CLIENT_SCRIPT_PATH', '/usr/local/sbin'); // Constant for the 5GHz wireless regulatory domain diff --git a/includes/firewall.php b/includes/firewall.php index 53503ced..4fbfad2c 100644 --- a/includes/firewall.php +++ b/includes/firewall.php @@ -129,7 +129,7 @@ function isIPv6(&$rule) */ function configureFirewall() { - $json = file_get_contents(RASPAP_IPTABLES_CONF); + $json = file_get_contents(RASPI_IPTABLES_CONF); $ipt = json_decode($json, true); $conf = ReadFirewallConf(); $txt = "#!/bin/bash\n"; @@ -182,7 +182,7 @@ function configureFirewall() function WriteFirewallConf($conf) { $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; } @@ -193,8 +193,8 @@ function WriteFirewallConf($conf) */ function ReadFirewallConf() { - if (file_exists(RASPAP_FIREWALL_CONF) ) { - $conf = parse_ini_file(RASPAP_FIREWALL_CONF); + if (file_exists(RASPI_FIREWALL_CONF) ) { + $conf = parse_ini_file(RASPI_FIREWALL_CONF); } else { $conf = array(); $conf["firewall-enable"] = false; @@ -266,7 +266,7 @@ function DisplayFirewallConfig() $status = new StatusMessages(); - $json = file_get_contents(RASPAP_IPTABLES_CONF); + $json = file_get_contents(RASPI_IPTABLES_CONF); $ipt_rules = json_decode($json, true); getWifiInterface(); $ap_device = $_SESSION['ap_interface'];