aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2013-05-14 22:21:14 -0300
committerMarcello Coutinho <marcellocoutinho@gmail.com>2013-05-14 22:21:14 -0300
commit943ba5d5bf0f0c0fedfcea7a1b5498d4d1d75a8a (patch)
tree05825ef632fd26bc52b344d47b12b706056e6072
parent86b9d0fc9c53fc10ee6a37630b609fb4a5656ba5 (diff)
downloadpfsense-packages-943ba5d5bf0f0c0fedfcea7a1b5498d4d1d75a8a.tar.gz
pfsense-packages-943ba5d5bf0f0c0fedfcea7a1b5498d4d1d75a8a.tar.bz2
pfsense-packages-943ba5d5bf0f0c0fedfcea7a1b5498d4d1d75a8a.zip
snort - add code to run only on backup system after xmlrpc sync
-rwxr-xr-xconfig/snort/snort.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index a191d941..c3381c66 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -847,7 +847,7 @@ function snort_rules_up_install_cron($should_install) {
}
/* Only run when all ifaces needed to sync. Expects filesystem rw */
-function sync_snort_package_config() {
+function sync_snort_package_config($via_rpc=false) {
global $config, $g, $flowbit_rules_file, $snort_enforcing_rules_file;
global $snort_version, $rebuild_rules;
@@ -891,6 +891,11 @@ function sync_snort_package_config() {
snort_sync_on_changes();
+ if ($via_rpc==true){
+
+ // include here all function calls snort need after xml rpc sync code on backup server
+
+ }
conf_mount_ro();
}
@@ -3167,7 +3172,7 @@ function snort_do_xmlrpc_sync($sync_to_ip, $username, $password, $synctimeout) {
/* tell snort to reload our settings on the destination sync host. */
$method = 'pfsense.exec_php';
$execcmd = "require_once('/usr/local/pkg/snort/snort.inc');\n";
- $execcmd .= "sync_snort_package_config();";
+ $execcmd .= "sync_snort_package_config(true);";
/* assemble xmlrpc payload */
$params = array(
XML_RPC_encode($password),