2019-09-02 04:37:13 +02:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
from cement.core.controller import CementBaseController, expose
|
2018-11-13 21:55:59 +01:00
|
|
|
from wo.core.logging import Log
|
2019-09-02 04:37:13 +02:00
|
|
|
from wo.core.services import WOService
|
2019-10-02 13:13:32 +02:00
|
|
|
from wo.core.variables import WOVar
|
2019-12-03 19:48:18 +01:00
|
|
|
from wo.core.fileutils import WOFileUtils
|
2018-11-13 21:55:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class WOStackStatusController(CementBaseController):
|
|
|
|
|
class Meta:
|
|
|
|
|
label = 'stack_services'
|
|
|
|
|
stacked_on = 'stack'
|
|
|
|
|
stacked_type = 'embedded'
|
|
|
|
|
description = 'Check the stack status'
|
|
|
|
|
|
|
|
|
|
@expose(help="Start stack services")
|
|
|
|
|
def start(self):
|
|
|
|
|
"""Start services"""
|
|
|
|
|
services = []
|
2019-08-27 22:25:18 +02:00
|
|
|
pargs = self.app.pargs
|
2023-08-12 16:11:36 +02:00
|
|
|
if all(value is None or value is False for value in vars(pargs).values()):
|
2019-08-07 02:45:26 +02:00
|
|
|
pargs.nginx = True
|
|
|
|
|
pargs.php = True
|
|
|
|
|
pargs.mysql = True
|
2019-08-16 14:53:39 +02:00
|
|
|
pargs.fail2ban = True
|
|
|
|
|
pargs.netdata = True
|
2019-12-03 19:48:18 +01:00
|
|
|
pargs.ufw = True
|
2019-08-07 02:45:26 +02:00
|
|
|
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if pargs.nginx or pargs.php:
|
|
|
|
|
if os.path.isfile('/usr/local/lsws/bin/openlitespeed'):
|
|
|
|
|
if 'lsws' not in services:
|
|
|
|
|
services = services + ['lsws']
|
2018-11-13 21:55:59 +01:00
|
|
|
else:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if pargs.nginx:
|
|
|
|
|
Log.info(self, "OpenLiteSpeed is not installed")
|
|
|
|
|
if pargs.php:
|
|
|
|
|
Log.info(self, "LSPHP is managed by OpenLiteSpeed")
|
2018-11-13 21:55:59 +01:00
|
|
|
|
2023-08-12 16:11:36 +02:00
|
|
|
for parg_version, version in WOVar.wo_php_versions.items():
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if getattr(pargs, parg_version, False):
|
|
|
|
|
if os.path.isfile('/usr/local/lsws/bin/openlitespeed'):
|
|
|
|
|
if 'lsws' not in services:
|
|
|
|
|
services = services + ['lsws']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "LSPHP is managed by OpenLiteSpeed")
|
2022-12-10 10:37:20 -03:00
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.mysql:
|
2019-10-02 13:13:32 +02:00
|
|
|
if ((WOVar.wo_mysql_host == "localhost") or
|
|
|
|
|
(WOVar.wo_mysql_host == "127.0.0.1")):
|
2020-11-01 22:34:38 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/mariadb.service'):
|
|
|
|
|
services = services + ['mariadb']
|
2018-11-13 21:55:59 +01:00
|
|
|
else:
|
|
|
|
|
Log.info(self, "MySQL is not installed")
|
|
|
|
|
else:
|
|
|
|
|
Log.warn(self, "Remote MySQL found, "
|
|
|
|
|
"Unable to check MySQL service status")
|
|
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.redis:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/redis-server.service'):
|
2018-11-13 21:55:59 +01:00
|
|
|
services = services + ['redis-server']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "Redis server is not installed")
|
|
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.fail2ban:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/fail2ban.service'):
|
2019-07-18 14:32:41 +02:00
|
|
|
services = services + ['fail2ban']
|
2019-04-25 01:38:14 +02:00
|
|
|
else:
|
|
|
|
|
Log.info(self, "fail2ban is not installed")
|
|
|
|
|
|
2019-07-19 13:47:29 +02:00
|
|
|
# proftpd
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.proftpd:
|
2019-10-29 01:10:37 +01:00
|
|
|
if os.path.exists('/etc/init.d/proftpd'):
|
2019-07-19 13:47:29 +02:00
|
|
|
services = services + ['proftpd']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "ProFTPd is not installed")
|
|
|
|
|
|
|
|
|
|
# netdata
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.netdata:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/netdata.service'):
|
2019-07-19 13:47:29 +02:00
|
|
|
services = services + ['netdata']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "Netdata is not installed")
|
|
|
|
|
|
2018-11-13 21:55:59 +01:00
|
|
|
for service in services:
|
|
|
|
|
Log.debug(self, "Starting service: {0}".format(service))
|
|
|
|
|
WOService.start_service(self, service)
|
|
|
|
|
|
|
|
|
|
@expose(help="Stop stack services")
|
|
|
|
|
def stop(self):
|
|
|
|
|
"""Stop services"""
|
|
|
|
|
services = []
|
2019-08-07 02:45:26 +02:00
|
|
|
pargs = self.app.pargs
|
2023-08-12 16:11:36 +02:00
|
|
|
if all(value is None or value is False for value in vars(pargs).values()):
|
2019-08-07 02:45:26 +02:00
|
|
|
pargs.nginx = True
|
|
|
|
|
pargs.php = True
|
|
|
|
|
pargs.mysql = True
|
2018-11-13 21:55:59 +01:00
|
|
|
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if pargs.nginx or pargs.php:
|
|
|
|
|
if os.path.isfile('/usr/local/lsws/bin/openlitespeed'):
|
|
|
|
|
if 'lsws' not in services:
|
|
|
|
|
services = services + ['lsws']
|
2018-11-13 21:55:59 +01:00
|
|
|
else:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if pargs.nginx:
|
|
|
|
|
Log.info(self, "OpenLiteSpeed is not installed")
|
|
|
|
|
if pargs.php:
|
|
|
|
|
Log.info(self, "LSPHP is managed by OpenLiteSpeed")
|
2019-12-03 19:48:18 +01:00
|
|
|
|
2023-08-12 16:11:36 +02:00
|
|
|
for parg_version, version in WOVar.wo_php_versions.items():
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if getattr(pargs, parg_version, False):
|
|
|
|
|
if os.path.isfile('/usr/local/lsws/bin/openlitespeed'):
|
|
|
|
|
if 'lsws' not in services:
|
|
|
|
|
services = services + ['lsws']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "LSPHP is managed by OpenLiteSpeed")
|
2022-12-10 10:37:20 -03:00
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.mysql:
|
2019-10-02 13:13:32 +02:00
|
|
|
if ((WOVar.wo_mysql_host == "localhost") or
|
|
|
|
|
(WOVar.wo_mysql_host == "127.0.0.1")):
|
2020-11-01 22:34:38 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/mariadb.service'):
|
|
|
|
|
services = services + ['mariadb']
|
2018-11-13 21:55:59 +01:00
|
|
|
else:
|
|
|
|
|
Log.info(self, "MySQL is not installed")
|
|
|
|
|
else:
|
|
|
|
|
Log.warn(self, "Remote MySQL found, "
|
|
|
|
|
"Unable to check MySQL service status")
|
|
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.redis:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/redis-server.service'):
|
2018-11-13 21:55:59 +01:00
|
|
|
services = services + ['redis-server']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "Redis server is not installed")
|
|
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.fail2ban:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/fail2ban.service'):
|
2019-07-18 14:32:41 +02:00
|
|
|
services = services + ['fail2ban']
|
2019-04-25 01:38:14 +02:00
|
|
|
else:
|
|
|
|
|
Log.info(self, "fail2ban is not installed")
|
|
|
|
|
|
2019-07-19 13:47:29 +02:00
|
|
|
# proftpd
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.proftpd:
|
2019-10-29 01:10:37 +01:00
|
|
|
if os.path.exists('/etc/init.d/proftpd'):
|
2019-07-19 13:47:29 +02:00
|
|
|
services = services + ['proftpd']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "ProFTPd is not installed")
|
|
|
|
|
|
|
|
|
|
# netdata
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.netdata:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/netdata.service'):
|
2019-07-19 13:47:29 +02:00
|
|
|
services = services + ['netdata']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "Netdata is not installed")
|
|
|
|
|
|
2018-11-13 21:55:59 +01:00
|
|
|
for service in services:
|
|
|
|
|
Log.debug(self, "Stopping service: {0}".format(service))
|
|
|
|
|
WOService.stop_service(self, service)
|
|
|
|
|
|
|
|
|
|
@expose(help="Restart stack services")
|
|
|
|
|
def restart(self):
|
|
|
|
|
"""Restart services"""
|
|
|
|
|
services = []
|
2019-08-07 02:45:26 +02:00
|
|
|
pargs = self.app.pargs
|
2023-08-12 16:11:36 +02:00
|
|
|
if all(value is None or value is False for value in vars(pargs).values()):
|
2019-08-07 02:45:26 +02:00
|
|
|
pargs.nginx = True
|
|
|
|
|
pargs.php = True
|
|
|
|
|
pargs.mysql = True
|
2019-08-16 14:53:39 +02:00
|
|
|
pargs.netdata = True
|
2019-08-07 02:45:26 +02:00
|
|
|
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if pargs.nginx or pargs.php:
|
|
|
|
|
if os.path.isfile('/usr/local/lsws/bin/openlitespeed'):
|
|
|
|
|
if 'lsws' not in services:
|
|
|
|
|
services = services + ['lsws']
|
2018-11-13 21:55:59 +01:00
|
|
|
else:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if pargs.nginx:
|
|
|
|
|
Log.info(self, "OpenLiteSpeed is not installed")
|
|
|
|
|
if pargs.php:
|
|
|
|
|
Log.info(self, "LSPHP is managed by OpenLiteSpeed")
|
2018-11-13 21:55:59 +01:00
|
|
|
|
2023-08-12 16:11:36 +02:00
|
|
|
for parg_version, version in WOVar.wo_php_versions.items():
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if getattr(pargs, parg_version, False):
|
|
|
|
|
if os.path.isfile('/usr/local/lsws/bin/openlitespeed'):
|
|
|
|
|
if 'lsws' not in services:
|
|
|
|
|
services = services + ['lsws']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "LSPHP is managed by OpenLiteSpeed")
|
2022-12-10 10:37:20 -03:00
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.mysql:
|
2019-10-02 13:13:32 +02:00
|
|
|
if ((WOVar.wo_mysql_host == "localhost") or
|
|
|
|
|
(WOVar.wo_mysql_host == "127.0.0.1")):
|
2020-11-01 22:34:38 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/mariadb.service'):
|
|
|
|
|
services = services + ['mariadb']
|
2018-11-13 21:55:59 +01:00
|
|
|
else:
|
|
|
|
|
Log.info(self, "MySQL is not installed")
|
|
|
|
|
else:
|
|
|
|
|
Log.warn(self, "Remote MySQL found, "
|
|
|
|
|
"Unable to check MySQL service status")
|
|
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.redis:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/redis-server.service'):
|
2018-11-13 21:55:59 +01:00
|
|
|
services = services + ['redis-server']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "Redis server is not installed")
|
|
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.fail2ban:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/fail2ban.service'):
|
2019-07-18 14:32:41 +02:00
|
|
|
services = services + ['fail2ban']
|
2019-04-25 01:38:14 +02:00
|
|
|
else:
|
|
|
|
|
Log.info(self, "fail2ban is not installed")
|
|
|
|
|
|
2019-07-19 13:47:29 +02:00
|
|
|
# proftpd
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.proftpd:
|
2019-10-29 01:10:37 +01:00
|
|
|
if os.path.exists('/etc/init.d/proftpd'):
|
2019-07-19 13:47:29 +02:00
|
|
|
services = services + ['proftpd']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "ProFTPd is not installed")
|
|
|
|
|
|
|
|
|
|
# netdata
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.netdata:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/netdata.service'):
|
2019-07-19 13:47:29 +02:00
|
|
|
services = services + ['netdata']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "Netdata is not installed")
|
|
|
|
|
|
2018-11-13 21:55:59 +01:00
|
|
|
for service in services:
|
|
|
|
|
Log.debug(self, "Restarting service: {0}".format(service))
|
|
|
|
|
WOService.restart_service(self, service)
|
|
|
|
|
|
|
|
|
|
@expose(help="Get stack status")
|
|
|
|
|
def status(self):
|
|
|
|
|
"""Status of services"""
|
|
|
|
|
services = []
|
2019-08-07 02:45:26 +02:00
|
|
|
pargs = self.app.pargs
|
2023-08-12 16:11:36 +02:00
|
|
|
if all(value is None or value is False for value in vars(pargs).values()):
|
2019-08-07 02:45:26 +02:00
|
|
|
pargs.nginx = True
|
|
|
|
|
pargs.php = True
|
|
|
|
|
pargs.mysql = True
|
2019-08-16 14:53:39 +02:00
|
|
|
pargs.fail2ban = True
|
|
|
|
|
pargs.netdata = True
|
2019-12-03 19:48:18 +01:00
|
|
|
pargs.ufw = True
|
2019-08-07 02:45:26 +02:00
|
|
|
|
|
|
|
|
if pargs.nginx:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.isfile('/usr/local/lsws/bin/openlitespeed'):
|
|
|
|
|
services = services + ['lsws']
|
2018-11-13 21:55:59 +01:00
|
|
|
else:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
Log.info(self, "OpenLiteSpeed is not installed")
|
2018-11-13 21:55:59 +01:00
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.php:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.isfile('/usr/local/lsws/bin/openlitespeed'):
|
|
|
|
|
if 'lsws' not in services:
|
|
|
|
|
services = services + ['lsws']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "LSPHP is managed by OpenLiteSpeed")
|
2022-01-23 15:14:24 -03:00
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.mysql:
|
2019-10-02 13:13:32 +02:00
|
|
|
if ((WOVar.wo_mysql_host == "localhost") or
|
|
|
|
|
(WOVar.wo_mysql_host == "127.0.0.1")):
|
2020-11-01 22:34:38 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/mariadb.service'):
|
|
|
|
|
services = services + ['mariadb']
|
2018-11-13 21:55:59 +01:00
|
|
|
else:
|
|
|
|
|
Log.info(self, "MySQL is not installed")
|
|
|
|
|
else:
|
|
|
|
|
Log.warn(self, "Remote MySQL found, "
|
|
|
|
|
"Unable to check MySQL service status")
|
|
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.redis:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/redis-server.service'):
|
2018-11-13 21:55:59 +01:00
|
|
|
services = services + ['redis-server']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "Redis server is not installed")
|
|
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.fail2ban:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/fail2ban.service'):
|
2019-07-18 14:32:41 +02:00
|
|
|
services = services + ['fail2ban']
|
2019-04-25 01:38:14 +02:00
|
|
|
else:
|
|
|
|
|
Log.info(self, "fail2ban is not installed")
|
|
|
|
|
|
2019-07-19 13:47:29 +02:00
|
|
|
# proftpd
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.proftpd:
|
2019-10-29 01:10:37 +01:00
|
|
|
if os.path.exists('/etc/init.d/proftpd'):
|
2019-07-19 13:47:29 +02:00
|
|
|
services = services + ['proftpd']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "ProFTPd is not installed")
|
|
|
|
|
|
|
|
|
|
# netdata
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.netdata:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/netdata.service'):
|
2019-07-19 13:47:29 +02:00
|
|
|
services = services + ['netdata']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "Netdata is not installed")
|
|
|
|
|
|
2019-12-03 19:48:18 +01:00
|
|
|
# UFW
|
|
|
|
|
if pargs.ufw:
|
|
|
|
|
if os.path.exists('/usr/sbin/ufw'):
|
|
|
|
|
if WOFileUtils.grepcheck(
|
|
|
|
|
self, '/etc/ufw/ufw.conf', 'ENABLED=yes'):
|
|
|
|
|
Log.info(self, "UFW Firewall is enabled")
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "UFW Firewall is disabled")
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "UFW is not installed")
|
|
|
|
|
|
2018-11-13 21:55:59 +01:00
|
|
|
for service in services:
|
|
|
|
|
if WOService.get_service_status(self, service):
|
|
|
|
|
Log.info(self, "{0:10}: {1}".format(service, "Running"))
|
|
|
|
|
|
|
|
|
|
@expose(help="Reload stack services")
|
|
|
|
|
def reload(self):
|
|
|
|
|
"""Reload service"""
|
|
|
|
|
services = []
|
2019-08-07 02:45:26 +02:00
|
|
|
pargs = self.app.pargs
|
2023-08-12 16:11:36 +02:00
|
|
|
if all(value is None or value is False for value in vars(pargs).values()):
|
2019-08-07 02:45:26 +02:00
|
|
|
pargs.nginx = True
|
|
|
|
|
pargs.php = True
|
|
|
|
|
pargs.mysql = True
|
2019-08-16 14:53:39 +02:00
|
|
|
pargs.fail2ban = True
|
2019-08-07 02:45:26 +02:00
|
|
|
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if pargs.nginx or pargs.php:
|
|
|
|
|
if os.path.isfile('/usr/local/lsws/bin/openlitespeed'):
|
|
|
|
|
if 'lsws' not in services:
|
|
|
|
|
services = services + ['lsws']
|
2018-11-13 21:55:59 +01:00
|
|
|
else:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if pargs.nginx:
|
|
|
|
|
Log.info(self, "OpenLiteSpeed is not installed")
|
|
|
|
|
if pargs.php:
|
|
|
|
|
Log.info(self, "LSPHP is managed by OpenLiteSpeed")
|
2022-01-23 15:14:24 -03:00
|
|
|
|
2023-08-12 16:11:36 +02:00
|
|
|
for parg_version, version in WOVar.wo_php_versions.items():
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if getattr(pargs, parg_version, False):
|
|
|
|
|
if os.path.isfile('/usr/local/lsws/bin/openlitespeed'):
|
|
|
|
|
if 'lsws' not in services:
|
|
|
|
|
services = services + ['lsws']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "LSPHP is managed by OpenLiteSpeed")
|
2022-12-10 10:37:20 -03:00
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.mysql:
|
2019-10-02 13:13:32 +02:00
|
|
|
if ((WOVar.wo_mysql_host == "localhost") or
|
|
|
|
|
(WOVar.wo_mysql_host == "127.0.0.1")):
|
2020-11-01 22:34:38 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/mariadb.service'):
|
2018-11-13 21:55:59 +01:00
|
|
|
services = services + ['mysql']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "MySQL is not installed")
|
|
|
|
|
else:
|
|
|
|
|
Log.warn(self, "Remote MySQL found, "
|
|
|
|
|
"Unable to check MySQL service status")
|
|
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.redis:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/redis-server.service'):
|
2018-11-13 21:55:59 +01:00
|
|
|
services = services + ['redis-server']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "Redis server is not installed")
|
|
|
|
|
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.fail2ban:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/fail2ban.service'):
|
2019-07-18 14:32:41 +02:00
|
|
|
services = services + ['fail2ban']
|
2019-04-25 01:38:14 +02:00
|
|
|
else:
|
|
|
|
|
Log.info(self, "fail2ban is not installed")
|
|
|
|
|
|
2019-07-19 13:47:29 +02:00
|
|
|
# proftpd
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.proftpd:
|
2019-10-29 01:10:37 +01:00
|
|
|
if os.path.exists('/etc/init.d/proftpd'):
|
2019-07-19 13:47:29 +02:00
|
|
|
services = services + ['proftpd']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "ProFTPd is not installed")
|
|
|
|
|
|
|
|
|
|
# netdata
|
2019-08-07 02:45:26 +02:00
|
|
|
if pargs.netdata:
|
feat: convert WordOps from Nginx to OpenLiteSpeed + LSPHP + LSCache
Complete conversion of the WordOps stack from Nginx + PHP-FPM to
OpenLiteSpeed + LSPHP + LSCache. This is a full rewrite across all 7
phases of the codebase:
- Foundation: OLS paths, variables, services, removed pynginxconfig dep
- Templates: 11 new OLS mustache templates, removed nginx-specific ones
- Stack: stack_pref, stack, stack_services, stack_upgrade, stack_migrate
- Site: site_functions, site, site_create, site_update
- Plugins: debug, info, log, clean rewritten for OLS
- SSL/ACME: acme.sh deploy uses lswsctrl, OLS vhssl blocks
- Other: secure, backup, clone, install script
Additional features:
- Debian 13 (trixie) support
- PHP 8.5 support
- WP Fort Knox mu-plugin integration (wo secure --lockdown/--unlock)
- --nginx CLI flag preserved for backward compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:16 +01:00
|
|
|
if os.path.exists('/lib/systemd/system/netdata.service'):
|
2019-07-19 13:47:29 +02:00
|
|
|
services = services + ['netdata']
|
|
|
|
|
else:
|
|
|
|
|
Log.info(self, "Netdata is not installed")
|
|
|
|
|
|
2018-11-13 21:55:59 +01:00
|
|
|
for service in services:
|
|
|
|
|
Log.debug(self, "Reloading service: {0}".format(service))
|
|
|
|
|
WOService.reload_service(self, service)
|