diff options
-rw-r--r-- | packages/carp_sync_server.php | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/packages/carp_sync_server.php b/packages/carp_sync_server.php index 417a59f6..54142cdc 100644 --- a/packages/carp_sync_server.php +++ b/packages/carp_sync_server.php @@ -36,28 +36,26 @@ require_once("filter.inc"); if($config['installedpackages']['carpsettings']['config'] != "") foreach($config['installedpackages']['carpsettings']['config'] as $carp) - if($carp['synchronizerules'] <> "") { - $rules = return_filename_as_string("{$g['tmp_path']}/rules_section.txt"); - $aliases = return_filename_as_string("{$g['tmp_path']}/aliases_section.txt"); - $nat = return_filename_as_string("{$g['tmp_path']}/nat_section.txt"); - $trafficshaper = return_filename_as_string("{$g['tmp_path']}/trafficshaper_section.txt"); - if($rules <> "") { - restore_config_section("filter", $rules); - unlink("{$g['tmp_path']}/rules_section.txt"); - } - if($aliases <> "") { - restore_config_section("aliases", $aliases); - unlink("{$g['tmp_path']}/aliases_section.txt"); - } - if($nat <> "") { - restore_config_section("nat", $nat); - unlink("{$g['tmp_path']}/nat_section.txt"); - } - if($trafficshaper <> "") { - restore_config_section("shaper", $trafficshaper); - unlink("{$g['tmp_path']}/nat_section.txt"); - } - filter_configure(); + $rules = return_filename_as_string("{$g['tmp_path']}/rules_section.txt"); + $aliases = return_filename_as_string("{$g['tmp_path']}/aliases_section.txt"); + $nat = return_filename_as_string("{$g['tmp_path']}/nat_section.txt"); + $trafficshaper = return_filename_as_string("{$g['tmp_path']}/trafficshaper_section.txt"); + if($rules <> "") { + restore_config_section("filter", $rules); + unlink("{$g['tmp_path']}/rules_section.txt"); } + if($aliases <> "") { + restore_config_section("aliases", $aliases); + unlink("{$g['tmp_path']}/aliases_section.txt"); + } + if($nat <> "") { + restore_config_section("nat", $nat); + unlink("{$g['tmp_path']}/nat_section.txt"); + } + if($trafficshaper <> "") { + restore_config_section("shaper", $trafficshaper); + unlink("{$g['tmp_path']}/nat_section.txt"); + } + filter_configure(); ?>
\ No newline at end of file |