mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Fix writing of the firewall config
This commit is contained in:
parent
5197df18e1
commit
721e576779
@ -3,7 +3,7 @@
|
|||||||
require_once 'includes/status_messages.php';
|
require_once 'includes/status_messages.php';
|
||||||
require_once 'includes/functions.php';
|
require_once 'includes/functions.php';
|
||||||
|
|
||||||
define(RASPAP_IPTABLES_SCRIPT,"/tmp/iptables_raspap.sh");
|
define('RASPAP_IPTABLES_SCRIPT',"/tmp/iptables_raspap.sh");
|
||||||
|
|
||||||
function getDependson(&$rule, &$conf) {
|
function getDependson(&$rule, &$conf) {
|
||||||
if ( isset($rule["dependson"][0]) ) {
|
if ( isset($rule["dependson"][0]) ) {
|
||||||
@ -104,13 +104,8 @@ function configureFirewall() {
|
|||||||
|
|
||||||
function WriteFirewallConf($conf) {
|
function WriteFirewallConf($conf) {
|
||||||
$ret = false;
|
$ret = false;
|
||||||
if ( is_array($conf) ) {
|
if ( is_array($conf) ) $ret = write_php_ini($conf,RASPAP_FIREWALL_CONF);
|
||||||
write_php_ini($conf,"/tmp/fwdata");
|
return $ret;
|
||||||
exec('sudo /bin/cp /tmp/fwdata '. RASPAP_FIREWALL_CONF,$out);
|
|
||||||
$ret = empty($out);
|
|
||||||
unlink("/tmp/fwdata");
|
|
||||||
}
|
|
||||||
return $ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user