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/functions.php';
|
||||
|
||||
define(RASPAP_IPTABLES_SCRIPT,"/tmp/iptables_raspap.sh");
|
||||
define('RASPAP_IPTABLES_SCRIPT',"/tmp/iptables_raspap.sh");
|
||||
|
||||
function getDependson(&$rule, &$conf) {
|
||||
if ( isset($rule["dependson"][0]) ) {
|
||||
@ -103,14 +103,9 @@ function configureFirewall() {
|
||||
}
|
||||
|
||||
function WriteFirewallConf($conf) {
|
||||
$ret = false;
|
||||
if ( is_array($conf) ) {
|
||||
write_php_ini($conf,"/tmp/fwdata");
|
||||
exec('sudo /bin/cp /tmp/fwdata '. RASPAP_FIREWALL_CONF,$out);
|
||||
$ret = empty($out);
|
||||
unlink("/tmp/fwdata");
|
||||
}
|
||||
return $ret
|
||||
$ret = false;
|
||||
if ( is_array($conf) ) $ret = write_php_ini($conf,RASPAP_FIREWALL_CONF);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user