|
Server IP : 37.60.233.201 / Your IP : 216.73.217.115 Web Server : Apache System : Linux host.ivahost.com 4.18.0-553.107.1.lve.el8.x86_64 #1 SMP Tue Feb 24 21:12:31 UTC 2026 x86_64 User : dcaksa ( 1043) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0555) : /etc/ld.so.conf.d/../authselect/../plymouth/../libibverbs.d/../rhsm/../../bin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
#!/opt/cloudlinux/venv/bin/python3 -bb
# coding=utf-8
#
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2020 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENCE.TXT
#
from __future__ import absolute_import
import argparse
import logging
from clwpos.daemon import WposDaemon
from clwpos.daemon_config import load_config
from clwpos.logsetup import setup_logging, init_wpos_sentry_safely
_DAEMON_LOGFILE_PATH = "/var/log/clwpos/daemon.log"
def daemon_main(_opts):
daemon = WposDaemon()
if _opts.action == "start":
daemon.run()
if _opts.action == "restart":
daemon.stop(graceful=False)
daemon.run()
elif _opts.action == "stop":
daemon.stop(_opts.graceful)
elif _opts.action == "reload":
daemon.reload()
if __name__ == '__main__':
parser = argparse.ArgumentParser(prog='wpos-daemon',
add_help=True,
description='Cloudlinux AccelerateWP daemon')
parser.add_argument('action',
help='start|restart|stop|reload the Cloudlinux AccelerateWP daemon',
choices=['start', 'restart', 'stop', 'reload'])
parser.add_argument('--graceful', help='use with the "stop" action to cleanup all processes',
action='store_true', default=False)
opts = parser.parse_args()
config = load_config()
setup_logging(
caller_name=None,
console_level=logging.getLevelName(config.logging_level),
file_level=logging.getLevelName(config.logging_level),
logfile_path=_DAEMON_LOGFILE_PATH
)
init_wpos_sentry_safely()
daemon_main(opts)