PK
œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in /home/telusvwg/public_html/da754d/index.php on line 8
| Dir : /opt/cloudlinux/venv/lib64/python3.11/site-packages/clcagefslib/webisolation/ |
| Server: Linux premium279.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64 IP: 66.29.132.192 |
| Dir : //opt/cloudlinux/venv/lib64/python3.11/site-packages/clcagefslib/webisolation/service.py |
#!/opt/cloudlinux/venv/bin/python3 -sbb
# -*- coding: utf-8 -*-
#
# 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
import shutil
import subprocess
SERVICE_NAME = "cagefs-docroot-monitor.service"
SERVICE_PATH = f"/usr/share/cagefs/service/{SERVICE_NAME}"
SYSTEMD_UNIT_PATH = f"/etc/systemd/system/{SERVICE_NAME}"
def is_running():
result = subprocess.run(
["/usr/bin/systemctl", "is-active", SERVICE_NAME], capture_output=True, text=True
)
return result.returncode == 0
def start_monitoring_service():
if is_running():
return
shutil.copy(SERVICE_PATH, SYSTEMD_UNIT_PATH)
result = subprocess.run(
["/usr/bin/systemctl", "enable", SERVICE_NAME], capture_output=True, text=True, check=True
)
if result.returncode:
return
result = subprocess.run(
["/usr/bin/systemctl", "daemon-reload"], capture_output=True, text=True, check=True
)
if result.returncode:
return
subprocess.run(
["/usr/bin/systemctl", "start", SERVICE_NAME], capture_output=True, text=True, check=True
)
def stop_monitoring_service():
if is_running():
subprocess.run(
["/usr/bin/systemctl", "stop", SERVICE_NAME], capture_output=True, text=True, check=True
)
# disable may fail if the unit file was never installed — that's fine
subprocess.run(
["/usr/bin/systemctl", "disable", SERVICE_NAME], capture_output=True, text=True
)
if os.path.exists(SYSTEMD_UNIT_PATH):
os.remove(SYSTEMD_UNIT_PATH)
subprocess.run(
["/usr/bin/systemctl", "daemon-reload"], capture_output=True, text=True, check=True
)