Linux evo.fastest-server.com 5.14.0-284.1101.el9.tuxcare.11.els11.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 14 13:30:35 UTC 2026 x86_64
LiteSpeed
Server IP : 103.249.112.113 & Your IP : 216.73.217.135
Domains : 988 Domain
User : tanishks
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
l.v.e-manager /
utils /
downgrades /
Delete
Unzip
Name
Size
Permission
Date
Action
clear-python-selector.py
1.58
KB
-rwxr-xr-x
2026-08-11 11:38
clear-reseller.py
1.87
KB
-rwxr-xr-x
2026-08-11 11:38
clear-resource-usage.py
3.29
KB
-rw-r--r--
2026-08-11 11:38
migrate-ui-configs.py
4.37
KB
-rwxr-xr-x
2026-08-11 11:38
Save
Rename
#!/opt/cloudlinux/venv/bin/python3 -bb # coding:utf-8 # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT # This script is used in cpanel-lvemanager.spec in case when lvemanager version < 5.3.7 from __future__ import print_function from __future__ import division from __future__ import absolute_import import os import subprocess import cldetectlib as detect import shutil SOURCE_PATH = "/usr/share/l.v.e-manager/" LVEMANAGER_VER = "/usr/share/l.v.e-manager/version" ACTUAL_CPANEL_VERSION = '5.3.8' ACTUAL_DA_VERSION = '5.1.0' ROOT_DA_DIR = "/usr/local/directadmin/plugins/" def main(): """ This function will determine panel name and execute function according to the panel :return: """ detect.getCP() if detect.CP_NAME == "cPanel" and is_version_older(ACTUAL_CPANEL_VERSION): clear_from_cpanel() elif detect.CP_NAME == "DA" and is_version_older(ACTUAL_DA_VERSION): clear_from_da() def current_version(): """ Return current lvemanager version :return: """ try: with open(LVEMANAGER_VER) as f: version = f.read() return version.split('-')[0] except Exception as e: print(e) def is_version_older(ver): """ Compares if the version if older then current version :param ver: :return: """ try: current_ver_tuple = tuple([int(i) for i in current_version().split(".")]) support_ver_tuple = tuple([int(i) for i in ver.split(".")]) return current_ver_tuple < support_ver_tuple except Exception as e: print(e) def exec_command(command, env=None): """ This function will run passed command in command line and returns result :param command: :param env: :return: """ result = [] try: p = subprocess.Popen(command, shell=True, executable='/bin/bash', stdout=subprocess.PIPE, env=env) while 1: output = p.stdout.readline() if not output: break if output.strip() != "": result.append(output.strip()) except Exception as e: print ("Call process error: " + str(e)) return result def clear_from_da(): """ Clears the new resource usage plugin for the DirectAdmin :return: """ print('Starting clear-resource-usage.py script...') if os.path.exists(ROOT_DA_DIR + "resource_usage"): shutil.rmtree(ROOT_DA_DIR + "resource_usage") def clear_from_cpanel(): """ Clears the new resource usage plugin for the CPanel :return: """ print('Starting clear-resource-usage.py script...') if (os.path.exists(SOURCE_PATH + "cpanel/resource_usage/plugin.tar.bz2") and os.path.exists("/usr/local/cpanel/scripts/uninstall_plugin")): exec_command("/usr/local/cpanel/scripts/uninstall_plugin " + SOURCE_PATH + "cpanel/resource_usage/plugin.tar.bz2 --theme paper_lantern") if os.path.exists("/usr/local/cpanel/base/frontend/paper_lantern/dynamicui/dynamicui_lveresusage.conf"): exec_command( "rm /usr/local/cpanel/base/frontend/paper_lantern/dynamicui/dynamicui_lveresusage.conf") if __name__ == '__main__': main()