aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-07-12 07:08:09 +0000
committerErmal <eri@pfsense.org>2012-07-12 07:08:09 +0000
commit93a87625a7f0ed28a8f974c1646d7ce676a37c1a (patch)
treef2b84a93c0b5a8385446e4925389cc378942f2bc
parent2b38970f0f61b1ebd77aad6eab5e68053886d3fa (diff)
downloadpfsense-packages-93a87625a7f0ed28a8f974c1646d7ce676a37c1a.tar.gz
pfsense-packages-93a87625a7f0ed28a8f974c1646d7ce676a37c1a.tar.bz2
pfsense-packages-93a87625a7f0ed28a8f974c1646d7ce676a37c1a.zip
Do not restart/start snort after rule update if its not running
-rw-r--r--config/snort/snort_check_for_rule_updates.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php
index 153278eb..3871b813 100644
--- a/config/snort/snort_check_for_rule_updates.php
+++ b/config/snort/snort_check_for_rule_updates.php
@@ -399,9 +399,12 @@ if ($snortdownload == 'on' || $emergingthreats == 'on') {
}
}
- exec("/bin/sh /usr/local/etc/rc.d/snort.sh restart");
- update_output_window(gettext("Snort has restarted with your new set of rules..."));
- log_error(gettext("Snort has restarted with your new set of rules..."));
+ if (is_process_running("snort")) {
+ exec("/bin/sh /usr/local/etc/rc.d/snort.sh restart");
+ update_output_window(gettext("Snort has restarted with your new set of rules..."));
+ log_error(gettext("Snort has restarted with your new set of rules..."));
+ } else
+ log_error(gettext("Snort Rules update finished..."));
}
update_status(gettext("The Rules update finished..."));