aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-09-27 00:30:27 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-09-27 00:30:27 +0000
commit42d1cf9d81688d601a7692872c9b865a6882bb42 (patch)
treee38e2d3450f8e7fa3d8d38eb166b2ca938b409ea /packages
parente2cc23b8680b3272b102f5de90dd69de35d39846 (diff)
downloadpfsense-packages-42d1cf9d81688d601a7692872c9b865a6882bb42.tar.gz
pfsense-packages-42d1cf9d81688d601a7692872c9b865a6882bb42.tar.bz2
pfsense-packages-42d1cf9d81688d601a7692872c9b865a6882bb42.zip
Restart snort services after rule changes
Diffstat (limited to 'packages')
-rw-r--r--packages/snort/snort_download_rules.php4
-rw-r--r--packages/snort/snort_rulesets.php3
2 files changed, 7 insertions, 0 deletions
diff --git a/packages/snort/snort_download_rules.php b/packages/snort/snort_download_rules.php
index e4182158..99538f8f 100644
--- a/packages/snort/snort_download_rules.php
+++ b/packages/snort/snort_download_rules.php
@@ -31,6 +31,7 @@
require_once("config.inc");
require_once("functions.inc");
require_once("guiconfig.inc");
+require_once("service-utils.inc");
$pgtitle = "Services: Snort: Update Rules";
@@ -177,6 +178,9 @@ update_all_status($static_output);
$config['installedpackages']['snort']['last_ruleset_download'] = date("Y-m-d");
write_config();
+stop_service("snort");
+start_service("snort");
+
/* cleanup temporary directory */
exec("/bin/rm -rf {$tmpfname};");
diff --git a/packages/snort/snort_rulesets.php b/packages/snort/snort_rulesets.php
index d0df633d..5708e0d1 100644
--- a/packages/snort/snort_rulesets.php
+++ b/packages/snort/snort_rulesets.php
@@ -28,6 +28,7 @@
*/
require("guiconfig.inc");
+require_once("service-utils.inc");
require("/usr/local/pkg/snort.inc");
if($_POST) {
@@ -41,7 +42,9 @@ if($_POST) {
}
$config['installedpackages']['snort']['rulesets'] = $enabled_items;
write_config();
+ stop_service("snort");
create_snort_conf();
+ start_service("snort");
$savemsg = "The snort ruleset selections have been saved.";
}