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)
def start(arg_parser): """Start command receiving thread""" command_server.start(arg_parser) pass