From: Joerg Linge Date: Thu, 3 Jun 2010 16:47:37 +0000 (+0800) Subject: check for writable checkresult directory X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=85f66f7c90aff2fe20ebbafddb7417a2728943e8;p=nagixsc.git check for writable checkresult directory --- diff --git a/nagixsc_http2nagios.py b/nagixsc_http2nagios.py index e327bc1..0a709a5 100755 --- a/nagixsc_http2nagios.py +++ b/nagixsc_http2nagios.py @@ -51,6 +51,10 @@ except ConfigParser.NoOptionError, e: print 'Config file error: %s ' % e sys.exit(1) +if os.access(config['checkresultdir'],os.W_OK) == False: + print 'Checkresult directory "%s" is not writable.' % config['checkresultdir'] + sys.exit(1) + users = {} for u in cfgread.options('users'): users[u] = cfgread.get('users', u)