From 0e16773047fb31d6c9bd86e187a6f8a373f326cf Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Wed, 18 Nov 2015 00:02:14 -0500 Subject: Ignore shell script RESTART command when a START is already in progress. --- config/snort/snort.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 60959ad6..5cdd5a00 100755 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -2934,6 +2934,7 @@ rc_start() { ### Remove the lock since we have started all interfaces if [ -f {$g['varrun_path']}/snort_pkg_starting.lck ]; then + sleep 2 /bin/rm {$g['varrun_path']}/snort_pkg_starting.lck fi } @@ -2954,8 +2955,12 @@ case $1 in rc_stop ;; restart) - rc_stop - rc_start + if [ ! -f {$g['varrun_path']}/snort_pkg_starting.lck ]; then + rc_stop + rc_start + else + /usr/bin/logger -p daemon.info -i -t SnortRestart "Ignoring RESTART command since Snort is already starting..." + fi ;; esac -- cgit v1.2.3