Sid Gifari From Gifari Industries - BD Cyber Security Team
Home
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
cllimits
/
cl_utils
/
✏️
Editing: cloudlinux-flags-sync.py
# -*- coding: utf-8 -*- # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2026 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT import argparse import logging import sys from typing import List from clflagssync.sync import run from lve_utils.sentry import init_lve_utils_sentry_client LOG_FILE = '/var/log/cloudlinux/cl-flags-sync.log' def create_logger() -> None: logging.basicConfig( filename=LOG_FILE, level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s', ) def main(argv: List[str]) -> int: parser = argparse.ArgumentParser( prog='cloudlinux-flags-sync', description='Apply the published CloudLinux feature-flag settings to this server.', ) parser.add_argument( '--force', action='store_true', help='fetch now instead of waiting for the configured poll interval', ) parser.add_argument( '--url', default=None, help='fetch the settings from here instead of the published file ' '(for exercising the mechanism against a file you control)', ) args = parser.parse_args(argv) create_logger() init_lve_utils_sentry_client('cloudlinux-flags-sync') # type: ignore[no-untyped-call] return run(force=args.force, url=args.url) if __name__ == '__main__': sys.exit(main(sys.argv[1:]))
💾 Save
❌ Cancel