????

Your IP : 18.118.195.30


Current Path : /proc/self/root/opt/cloudlinux/venv/lib64/python3.11/site-packages/clconfigure/
Upload File :
Current File : //proc/self/root/opt/cloudlinux/venv/lib64/python3.11/site-packages/clconfigure/clpro.py

# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2018 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# https://cloudlinux.com/docs/LICENCE.TXT
#
import logging

from clcommon.utils import is_ubuntu
from clconfigure import run, task


@task("Disabling autotracing")
def disable_autotracing():
    # TODO: Remove this check when autotracing is supported on Ubuntu
    #       in the task CLPRO-2506
    if is_ubuntu():
        logging.info('Autotracing is not supported on Ubuntu. Skipping...')
        return

    result = run(['/usr/sbin/cloudlinux-autotracing', 'disable', '--all'])
    if result.exitcode != 0:
        logging.warning('Unable to disable autotracing. stdout: %s, stderr: %s',
                        result.stdout, result.stderr)


@task("Reconfiguration of Shared Pro exclusive features")
def trigger_manage_clplus():
    # TODO: Remove this check when Shared Pro features are supported on Ubuntu
    #       in the tasks CLPRO-2533, CLPRO-2535, CLPRO-2539
    if is_ubuntu():
        logging.info('Shared Pro features are not supported on Ubuntu. Skipping...')
        return

    result = run(['/usr/share/cloudlinux/cl_plus/manage_clplus'])
    if result.exitcode != 0:
        logging.warning('Unable to reconfigure Shared Pro-only features. stdout: %s, stderr: %s',
                        result.stdout, result.stderr)