Code

Added --nossl to HTTP daemons
[nagixsc.git] / nagixsc_conf2http.py
index d296bfff07bd2ca70da64fdd8e5ef3a1bbbccf2b..abeed4e8252fc59dd494702cee06ff6c6a632ded 100755 (executable)
@@ -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='conf2http.cfg')
 
@@ -124,6 +125,9 @@ class Conf2HTTPHandler(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)