Module: check_mk
Branch: master
Commit: 1fd30e76b41aa56075369bac8ae770c472735ffc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1fd30e76b41aa5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jul 22 14:32:15 2015 +0200
Call optional shutdown_function in event handler loop
---
modules/events.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/events.py b/modules/events.py
index 1bb234d..fe2dff7 100644
--- a/modules/events.py
+++ b/modules/events.py
@@ -58,6 +58,8 @@ def event_keepalive(event_function, log_function, call_every_loop=None,
loop_int
if event_data_available(loop_interval):
if last_config_timestamp != config_timestamp():
log_function("Configuration has changed. Restarting
myself.")
+ if shutdown_function:
+ shutdown_function()
os.putenv("CMK_EVENT_RESTART", "1")
os.execvp("cmk", sys.argv)