X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=nagixsc_http2nagios.py;h=ad86b65eba536feb843e40198c1f06af8a55a11d;hb=a56847623bde31e758b4f92a9b5f5ede27e01262;hp=b0e6fd266e3522e07136c7158d1078cbad5410df;hpb=828e84c4800e2ea294178630755f8428230fa49d;p=nagixsc.git diff --git a/nagixsc_http2nagios.py b/nagixsc_http2nagios.py index b0e6fd2..ad86b65 100755 --- a/nagixsc_http2nagios.py +++ b/nagixsc_http2nagios.py @@ -22,6 +22,7 @@ from nagixsc import * 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') @@ -121,6 +122,9 @@ class HTTP2NagiosHandler(MyHTTPRequestHandler): 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)