def main(argv):
    check_py_version()
    safplus.import_os_adaption_layer()

    logging.basicConfig(format="%(levelname)s %(message)s", level=logging.WARNING)
    if sys.argv[1] == "help":
        watchdog_usage()
        return 1
    parse_command_line(argv[2:])
    if RemovePersistentDb:
        shutil.rmtree(safplus.SAFPLUS_DB_DIR, ignore_errors=True)

    mkdir(safplus.SAFPLUS_RUN_DIR)
    mkdir(safplus.SAFPLUS_LOG_DIR)
    mkdir(safplus.SAFPLUS_DB_DIR)

    watchdog_driver(argv[1])
def main(argv):
    check_py_version()
    safplus.import_os_adaption_layer()

    logging.basicConfig(format='%(levelname)s %(message)s',
                        level=logging.WARNING)
    if sys.argv[1] == 'help':
        watchdog_usage()
        return 1
    parse_command_line(argv[2:])
    if RemovePersistentDb:
        shutil.rmtree(safplus.SAFPLUS_DB_DIR, ignore_errors=True)

    mkdir(safplus.SAFPLUS_RUN_DIR)
    mkdir(safplus.SAFPLUS_LOG_DIR)
    mkdir(safplus.SAFPLUS_DB_DIR)

    watchdog_driver(argv[1])
Exemplo n.º 3
0
def main(argv):
    check_py_version()
    safplus.import_os_adaption_layer()

    logging.basicConfig(format='%(levelname)s %(message)s', level=logging.INFO)

    if len(sys.argv) == 1 or sys.argv[1] == 'help' :
        watchdog_usage() 
        return 1

    parse_command_line(argv[2:])

    # This is handled during AMF restart    
    # if RemovePersistentDb:
    #  shutil.rmtree(safplus.SAFPLUS_DB_DIR,ignore_errors=True)

    mkdir(safplus.SAFPLUS_RUN_DIR)
    mkdir(safplus.SAFPLUS_LOG_DIR)
    mkdir(safplus.SAFPLUS_DB_DIR)

    watchdog_driver(argv[1])
Exemplo n.º 4
0
def main():
    safplus.import_os_adaption_layer()
    logging.basicConfig(filename='%s/amf_watchdog.log' % safplus.SAFPLUS_LOG_DIR, format='%(levelname)s %(message)s', level=logging.DEBUG)
    watchdog_loop()
def main():
    safplus.import_os_adaption_layer()
    configWatchdogLog()
    watchdog_loop()