inserimento gestione utenze VPN
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
function genera () {
|
||||
|
||||
// $file_in = "/etc/sysconfig/scripts/SuSEfirewall2-custom";
|
||||
$file_in = "tmp/fw.new";
|
||||
$file_out = "tmp/fw.new";
|
||||
// $file_in = "tmp/fw.new";
|
||||
// $file_out = "tmp/fw.new";
|
||||
$FW_conf = carica_conf ("Firewall");
|
||||
|
||||
$FW = file ($file_in);
|
||||
$FW = file ($FW_conf['file_in']);
|
||||
$prima = array ();
|
||||
$dopo = array ();
|
||||
$vecchie_u = array ();
|
||||
@@ -51,16 +52,15 @@ function genera () {
|
||||
elimina ($regola);
|
||||
}
|
||||
|
||||
|
||||
$new = array_merge($prima,$nuove_ext[1], $dopo);
|
||||
file_put_contents ($file_out, $new, LOCK_EX);
|
||||
|
||||
file_put_contents ($FW_conf['file_out'], $new, LOCK_EX);
|
||||
$comando = "sudo cp ".$FW_conf['file_out']." ".$FW_conf['file_in'];
|
||||
exec ($comando);
|
||||
}
|
||||
|
||||
function genera_ext () {
|
||||
global $UTENTE, $DB_ID, $CONF;
|
||||
global $UTENTE, $DB_ID, $CONF, $FW_conf;
|
||||
|
||||
$FW_conf = carica_conf ("Firewall");
|
||||
|
||||
$query = " SELECT
|
||||
firewall_versoesterno_regole.id,
|
||||
|
||||
Reference in New Issue
Block a user