From 3977d64b4851da69277604c2f7317377a3667c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Fri, 2 Nov 2012 11:59:04 +0100 Subject: Check if snort is not running after rule update and HUP signal then restart it. --- config/snort/snort_check_for_rule_updates.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config/snort') diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php index d4f990a4..61479a15 100644 --- a/config/snort/snort_check_for_rule_updates.php +++ b/config/snort/snort_check_for_rule_updates.php @@ -396,6 +396,9 @@ if ($snortdownload == 'on' || $emergingthreats == 'on') { } exec("/bin/sh /usr/local/etc/rc.d/snort.sh restart"); + sleep(10); + if (!is_process_running("snort")) + exec("/bin/sh /usr/local/etc/rc.d/snort.sh start"); update_output_window(gettext("Snort has restarted with your new set of rules...")); log_error("Snort has restarted with your new set of rules..."); -- cgit v1.2.3