Module: check_mk
Branch: master
Commit: fa06f58c17b59db465ec49a32cae4fb515a9d0b1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fa06f58c17b59d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jun 6 10:35:41 2013 +0200
Liveproxyd: handle case where no config file exists
---
doc/treasures/liveproxy/liveproxyd | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/doc/treasures/liveproxy/liveproxyd b/doc/treasures/liveproxy/liveproxyd
index 431debe..a87cf10 100755
--- a/doc/treasures/liveproxy/liveproxyd
+++ b/doc/treasures/liveproxy/liveproxyd
@@ -713,13 +713,14 @@ def signal_handler(signum, stack_frame):
g_need_reload = True
def read_configuration():
- try:
- execfile(opt_configfile, globals())
- except Exception, e:
- if opt_debug:
- raise
- bail_out("Cannot read configuration file %s: %s" % (
- opt_configfile, e))
+ if os.path.exists(opt_configfile):
+ try:
+ execfile(opt_configfile, globals())
+ except Exception, e:
+ if opt_debug:
+ raise
+ bail_out("Cannot read configuration file %s: %s" % (
+ opt_configfile, e))
# Create state object for all sites
for sitename, siteconf in sites.items():