summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 06da2e7)
raw | patch | inline | side by side (parent: 06da2e7)
author | Sven Velt <sven@velt.de> | |
Thu, 18 Feb 2010 12:08:43 +0000 (13:08 +0100) | ||
committer | Sven Velt <sven@velt.de> | |
Thu, 18 Feb 2010 12:08:43 +0000 (13:08 +0100) |
Disable SSL on command line even if it's activated in cfg file.
Signed-off-by: Sven Velt <sven@velt.de>
Signed-off-by: Sven Velt <sven@velt.de>
nagixsc_conf2http.py | patch | blob | history | |
nagixsc_http2nagios.py | patch | blob | history |
diff --git a/nagixsc_conf2http.py b/nagixsc_conf2http.py
index d296bfff07bd2ca70da64fdd8e5ef3a1bbbccf2b..abeed4e8252fc59dd494702cee06ff6c6a632ded 100755 (executable)
--- a/nagixsc_conf2http.py
+++ b/nagixsc_conf2http.py
parser = optparse.OptionParser()
parser.add_option('-c', '', dest='cfgfile', help='Config file')
+parser.add_option('', '--nossl', action='store_true', dest='nossl', help='Disable SSL (overwrites config file)')
parser.set_defaults(cfgfile='conf2http.cfg')
def main():
+ if options.nossl:
+ config['ssl'] = False
+
if config['ssl'] and not os.path.isfile(config['cert']):
print 'SSL certificate "%s" not found!' % config['cert']
sys.exit(127)
diff --git a/nagixsc_http2nagios.py b/nagixsc_http2nagios.py
index b0e6fd266e3522e07136c7158d1078cbad5410df..ad86b65eba536feb843e40198c1f06af8a55a11d 100755 (executable)
--- a/nagixsc_http2nagios.py
+++ b/nagixsc_http2nagios.py
parser = optparse.OptionParser()
parser.add_option('-c', '', dest='cfgfile', help='Config file')
+parser.add_option('', '--nossl', action='store_true', dest='nossl', help='Disable SSL (overwrites config file)')
parser.set_defaults(cfgfile='http2nagios.cfg')
def main():
+ if options.nossl:
+ config['ssl'] = False
+
if config['ssl'] and not os.path.isfile(config['cert']):
print 'SSL certificate "%s" not found!' % config['cert']
sys.exit(127)