summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e2702a)
raw | patch | inline | side by side (parent: 9e2702a)
author | Sven Velt <sven@velt.de> | |
Fri, 3 Sep 2010 13:53:04 +0000 (15:53 +0200) | ||
committer | Sven Velt <sven@velt.de> | |
Fri, 3 Sep 2010 13:53:04 +0000 (15:53 +0200) |
nagixsc_conf2http.py | patch | blob | history | |
nagixsc_http2nagios.py | patch | blob | history |
diff --git a/nagixsc_conf2http.py b/nagixsc_conf2http.py
index c87959bde20de2e135e1eff24b6dea8e5b3ad25b..7698d43a18cfb8811a300ecf730850e69cfe9010 100755 (executable)
--- a/nagixsc_conf2http.py
+++ b/nagixsc_conf2http.py
'pidfile': '/var/run/nagixsc_conf2http.pid'
}
-if 'ip' in cfgread.items('server'):
+if 'ip' in cfgread.options('server'):
config['ip'] = cfgread.get('server', 'ip')
-if 'port' in cfgread.items('server'):
+if 'port' in cfgread.options('server'):
config['port'] = cfgread.get('server', 'port')
try:
config['port'] = int(config['port'])
print 'Port "%s" not an integer!' % config['port']
sys.exit(127)
-if 'ssl' in cfgread.items('server'):
+if 'ssl' in cfgread.options('server'):
try:
config['ssl'] = cfgread.getboolean('server', 'ssl')
except ValueError:
sys.exit(127)
if config['ssl']:
- if 'sslcert' in cfgread.items('server'):
+ if 'sslcert' in cfgread.options('server'):
config['sslcert'] = cfgread.get('server', 'sslcert')
else:
print 'SSL but no certificate file specified!'
print 'No "conf_dir" specified!'
sys.exit(127)
-if 'pidfile' in cfgread.items('server'):
+if 'pidfile' in cfgread.options('server'):
config['pidfile'] = cfgread.get('server', 'pidfile')
diff --git a/nagixsc_http2nagios.py b/nagixsc_http2nagios.py
index dd05e62e90c554559cf0b0144c94bfa94ccd6635..df8e2d394f7fd47de91c327f815905c9c5e216d5 100755 (executable)
--- a/nagixsc_http2nagios.py
+++ b/nagixsc_http2nagios.py
'pidfile': '/var/run/nagixsc_conf2http.pid'
}
-if 'ip' in cfgread.items('server'):
+if 'ip' in cfgread.options('server'):
config['ip'] = cfgread.get('server', 'ip')
-if 'port' in cfgread.items('server'):
+if 'port' in cfgread.options('server'):
config['port'] = cfgread.get('server', 'port')
try:
config['port'] = int(config['port'])
print 'Port "%s" not an integer!' % config['port']
sys.exit(127)
-if 'ssl' in cfgread.items('server'):
+if 'ssl' in cfgread.options('server'):
try:
config['ssl'] = cfgread.getboolean('server', 'ssl')
except ValueError:
sys.exit(127)
if config['ssl']:
- if 'sslcert' in cfgread.items('server'):
+ if 'sslcert' in cfgread.options('server'):
config['sslcert'] = cfgread.get('server', 'sslcert')
else:
print 'SSL but no certificate file specified!'