Module: check_mk
Branch: master
Commit: 5b0c85ee06463115b08728ff54b0749fb8fb7db5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5b0c85ee064631…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 31 17:53:53 2013 +0100
mkeventd: init script detects (reports) already running processes now
---
mkeventd/omd/mkeventd.init | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/mkeventd/omd/mkeventd.init b/mkeventd/omd/mkeventd.init
index 6b402b3..f67259a 100755
--- a/mkeventd/omd/mkeventd.init
+++ b/mkeventd/omd/mkeventd.init
@@ -19,9 +19,17 @@ case "$1" in
start)
if [ "$CONFIG_MKEVENTD_SYSLOG" = on ] ; then
echo -n 'Starting mkeventd with integrated syslog...'
+ if kill -0 $THE_PID >/dev/null 2>&1; then
+ echo 'Already running.'
+ exit 0
+ fi
${DAEMON}_open514 --syslog --syslog-fd 3 $OPTS
else
echo -n 'Starting mkeventd...'
+ if kill -0 $THE_PID >/dev/null 2>&1; then
+ echo 'Already running.'
+ exit 0
+ fi
$DAEMON $OPTS
fi
echo OK