コード例 #1
0
ファイル: linot.py プロジェクト: KavenC/Linot
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)
コード例 #2
0
ファイル: linot.py プロジェクト: hpeter/Linot
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)
コード例 #3
0
ファイル: __init__.py プロジェクト: gitter-badger/Linot
def start(arg_parser):
    """Start command receiving thread"""
    command_server.start(arg_parser)
    pass