ok
Direktori : /opt/alt/python37/lib/python3.7/site-packages/clconfigure/cli/ |
Current File : //opt/alt/python37/lib/python3.7/site-packages/clconfigure/cli/cloudlinux-edition-watcher |
#!/opt/cloudlinux/venv/bin/python3 -bb # coding=utf-8 # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2020 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENCE.TXT # """ Detects edition change and performs predefined actions. """ import argparse from clsentry import init_sentry_client from clconfigure.watcher import ( PKG_VERSION_TINY, SENTRY_DSN, check, save_edition ) if __name__ == "__main__": init_sentry_client('cloudlinux-edition-watcher', PKG_VERSION_TINY, SENTRY_DSN, custom_length=7000) parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(dest='action') subparsers.add_parser('save') subparsers.add_parser('check') args = parser.parse_args() if args.action == 'save': save_edition() elif args.action == 'check': check() else: parser.print_help() exit(1)