Esempio n. 1
0
def main():
    if len(sys.argv) == 2:
        config = load_conf(sys.argv[1])
    else:
        config = load_conf('/opt/janus-cloud/conf/janus-proxy.yml')

    if config['general']['daemonize']:
        with DaemonContext(
                stdin=sys.stdin,
                stdout=sys.stdout,
                # working_directory=os.getcwd(),
                files_preserve=list(range(3, 100))):
            do_main(config)
    else:
        do_main(config)
Esempio n. 2
0
def main():
    if len(sys.argv) == 2:
        config = load_conf(sys.argv[1])
    else:
        config = load_conf('/opt/janus-cloud/conf/janus-proxy.yml')

    if config['general']['daemonize']:
        with DaemonContext(stdin=sys.stdin,
                           stdout=sys.stdout,
                           # Change the current working directory to the root
                           # so we won't prevent file systems from being unmounted.
                           # working_directory=os.getcwd(),
                           files_preserve=list(range(3, 100))):
            do_main(config)
    else:
        do_main(config)