aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata/suricata_post_install.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-10-10 15:59:07 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-12-15 12:11:58 -0500
commitd2a824eee9c499258fda4f9e21475fe31bdb53cf (patch)
tree2960e2dd338dc5798d3252d846ecb47ec90c7645 /config/suricata/suricata_post_install.php
parent34e19f4b7ffe46ddba00b9fcc2c1de062ffc047b (diff)
downloadpfsense-packages-d2a824eee9c499258fda4f9e21475fe31bdb53cf.tar.gz
pfsense-packages-d2a824eee9c499258fda4f9e21475fe31bdb53cf.tar.bz2
pfsense-packages-d2a824eee9c499258fda4f9e21475fe31bdb53cf.zip
Remove unnecessary calls to write_config() to reduce auto-backups.
Diffstat (limited to 'config/suricata/suricata_post_install.php')
-rw-r--r--config/suricata/suricata_post_install.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/config/suricata/suricata_post_install.php b/config/suricata/suricata_post_install.php
index 972539ac..16fe4208 100644
--- a/config/suricata/suricata_post_install.php
+++ b/config/suricata/suricata_post_install.php
@@ -149,7 +149,6 @@ if ($config['installedpackages']['suricata']['config'][0]['forcekeepsettings'] =
log_error(gettext("[Suricata] updated UUID for interface " . convert_friendly_interface_to_friendly_descr($suricatacfg['interface']) . " from {$old_uuid} to {$new_uuid}."));
}
}
- write_config("Suricata pkg: updated interface UUIDs to eliminate duplicates.");
unset($uuids, $rulesets);
}
/****************************************************************/
@@ -221,11 +220,14 @@ if ($config['installedpackages']['suricata']['config'][0]['forcekeepsettings'] =
// Only try to start Suricata if not in reboot
if (!$g['booting']) {
- update_status(gettext("Starting Suricata using rebuilt configuration..."));
- update_output_window(gettext("Please wait... while Suricata is started..."));
- log_error(gettext("[Suricata] Starting Suricata using rebuilt configuration..."));
- mwexec_bg("{$rcdir}suricata.sh start");
- update_output_window(gettext("Suricata has been started using the rebuilt configuration..."));
+ if ($pkg_interface <> "console") {
+ update_status(gettext("Starting Suricata using rebuilt configuration..."));
+ update_output_window(gettext("Please wait while Suricata is started..."));
+ mwexec("{$rcdir}suricata.sh start");
+ update_output_window(gettext("Suricata has been started using the rebuilt configuration..."));
+ }
+ else
+ mwexec_bg("{$rcdir}suricata.sh start");
}
}
@@ -239,7 +241,7 @@ conf_mount_ro();
// Update Suricata package version in configuration
$config['installedpackages']['suricata']['config'][0]['suricata_config_ver'] = "2.0.3";
-write_config("Suricata pkg: updated GUI package version number.");
+write_config("Suricata pkg v2.0.3: post-install configuration saved.");
// Done with post-install, so clear flag
unset($g['suricata_postinstall']);