Exemplo n.º 1
0
def main():
    # Add common commands
    parser = LinotParser(usage=argparse.SUPPRESS, add_help=False)
    cmd_group = LinotArgParser('linot', parser, cmd_process)
    cmd_group.add_argument('-stopserver', action='store_true', help=argparse.SUPPRESS)
    cmd_group.add_argument('-listservices', action='store_true', help='Show installed services')
    # cmd_group.add_argument('-backup', action='store_true', help=argparse.SUPPRESS)
    # cmd_group.add_argument('-listbackups', action='store_true', help=argparse.SUPPRESS)
    # cmd_group.add_argument('-restore', help=argparse.SUPPRESS)

    # Load plugins
    for service in services.pkg_list:
        logger.info('Loading service: ' + service)
        service_instance = services.pkg_list[service].Service()
        service_instance.setup(parser)
        service_instances[service] = service_instance
        service_instance.start()

    command_server.start(parser)
Exemplo n.º 2
0
def main():
    # Add common commands
    parser = LinotParser(usage=argparse.SUPPRESS, add_help=False)
    cmd_group = LinotArgParser('linot', parser, cmd_process)
    cmd_group.add_argument('-stopserver', action='store_true', help=argparse.SUPPRESS)
    cmd_group.add_argument('-listservices', action='store_true', help='Show installed services')
    # cmd_group.add_argument('-backup', action='store_true', help=argparse.SUPPRESS)
    # cmd_group.add_argument('-listbackups', action='store_true', help=argparse.SUPPRESS)
    # cmd_group.add_argument('-restore', help=argparse.SUPPRESS)

    # Load plugins
    for service in services.pkg_list:
        logger.info('Loading service: ' + service)
        service_instance = services.pkg_list[service].Service()
        service_instance.setup(parser)
        service_instances[service] = service_instance
        service_instance.start()

    command_server.start(parser)
Exemplo n.º 3
0
def start(arg_parser):
    """Start command receiving thread"""
    command_server.start(arg_parser)
    pass