2019-08-16 23:26:23 +02:00
|
|
|
"""WordOps core variable module"""
|
|
|
|
|
import configparser
|
2019-09-04 20:36:15 +02:00
|
|
|
import os
|
2022-07-12 08:33:01 +02:00
|
|
|
import sys
|
2019-10-02 13:13:32 +02:00
|
|
|
from datetime import datetime
|
|
|
|
|
from re import match
|
|
|
|
|
from socket import getfqdn
|
2019-10-23 12:24:30 +02:00
|
|
|
from shutil import copy2
|
2019-09-04 20:36:15 +02:00
|
|
|
|
2022-07-12 08:33:01 +02:00
|
|
|
from distro import distro, linux_distribution
|
2019-10-02 13:13:32 +02:00
|
|
|
from sh import git
|
2019-08-16 23:26:23 +02:00
|
|
|
|
|
|
|
|
|
2019-10-02 13:13:32 +02:00
|
|
|
class WOVar():
|
2019-08-16 23:26:23 +02:00
|
|
|
"""Intialization of core variables"""
|
|
|
|
|
|
|
|
|
|
# WordOps version
|
2024-12-03 14:08:19 +01:00
|
|
|
wo_version = "3.22.0"
|
2019-08-16 23:26:23 +02:00
|
|
|
# WordOps packages versions
|
2022-01-26 13:05:34 +01:00
|
|
|
wo_adminer = "4.8.1"
|
2022-09-09 14:28:42 +02:00
|
|
|
wo_phpmyadmin = "5.2.0"
|
2023-01-05 22:02:52 +01:00
|
|
|
wo_extplorer = "2.1.15"
|
2024-04-21 17:40:53 +02:00
|
|
|
wo_dashboard = "1.3"
|
2019-08-16 23:26:23 +02:00
|
|
|
|
|
|
|
|
# Get WPCLI path
|
2024-05-31 22:22:08 +02:00
|
|
|
wpcli_url = "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
|
2019-08-16 23:26:23 +02:00
|
|
|
wo_wpcli_path = '/usr/local/bin/wp'
|
|
|
|
|
|
|
|
|
|
# Current date and time of System
|
2019-10-02 13:13:32 +02:00
|
|
|
wo_date = datetime.now().strftime('%d%b%Y-%H-%M-%S')
|
2019-08-16 23:26:23 +02:00
|
|
|
|
|
|
|
|
# WordOps core variables
|
2019-10-23 12:24:30 +02:00
|
|
|
# linux distribution
|
2022-10-25 10:35:22 +02:00
|
|
|
if sys.version_info <= (3, 5):
|
2022-07-12 08:33:01 +02:00
|
|
|
wo_distro = linux_distribution(
|
|
|
|
|
full_distribution_name=False)[0].lower()
|
|
|
|
|
wo_platform_version = linux_distribution(
|
|
|
|
|
full_distribution_name=False)[1].lower()
|
|
|
|
|
# distro codename (bionic, xenial, stretch ...)
|
|
|
|
|
wo_platform_codename = linux_distribution(
|
|
|
|
|
full_distribution_name=False)[2].lower()
|
|
|
|
|
else:
|
|
|
|
|
wo_distro = distro.id()
|
|
|
|
|
wo_platform_version = distro.version()
|
|
|
|
|
# distro codename (bionic, xenial, stretch ...)
|
|
|
|
|
wo_platform_codename = distro.codename()
|
2019-08-16 23:26:23 +02:00
|
|
|
|
|
|
|
|
# Get timezone of system
|
|
|
|
|
if os.path.isfile('/etc/timezone'):
|
2019-10-23 12:24:30 +02:00
|
|
|
with open("/etc/timezone", mode='r', encoding='utf-8') as tzfile:
|
2019-08-16 23:26:23 +02:00
|
|
|
wo_timezone = tzfile.read().replace('\n', '')
|
|
|
|
|
if wo_timezone == "Etc/UTC":
|
|
|
|
|
wo_timezone = "UTC"
|
|
|
|
|
else:
|
|
|
|
|
wo_timezone = "Europe/Amsterdam"
|
|
|
|
|
|
|
|
|
|
# Get FQDN of system
|
2019-10-02 13:13:32 +02:00
|
|
|
wo_fqdn = getfqdn()
|
2019-08-16 23:26:23 +02:00
|
|
|
|
|
|
|
|
# WordOps default webroot path
|
|
|
|
|
wo_webroot = '/var/www/'
|
|
|
|
|
|
|
|
|
|
# WordOps default renewal SSL certificates path
|
|
|
|
|
wo_ssl_archive = '/etc/letsencrypt/renewal'
|
|
|
|
|
|
|
|
|
|
# WordOps default live SSL certificates path
|
|
|
|
|
wo_ssl_live = '/etc/letsencrypt/live'
|
|
|
|
|
|
|
|
|
|
# PHP user
|
|
|
|
|
wo_php_user = 'www-data'
|
|
|
|
|
|
2019-10-23 12:24:30 +02:00
|
|
|
# WordOps git configuration management
|
2019-08-16 23:26:23 +02:00
|
|
|
config = configparser.ConfigParser()
|
2019-10-30 04:23:20 +01:00
|
|
|
config.read(os.path.expanduser("~") + '/.gitconfig')
|
2019-08-16 23:26:23 +02:00
|
|
|
try:
|
|
|
|
|
wo_user = config['user']['name']
|
|
|
|
|
wo_email = config['user']['email']
|
|
|
|
|
except Exception:
|
2019-10-02 13:13:32 +02:00
|
|
|
print("WordOps (wo) require an username & and an email "
|
|
|
|
|
"address to configure Git (used to save server configurations)")
|
|
|
|
|
print("Your informations will ONLY be stored locally")
|
|
|
|
|
|
2019-08-16 23:26:23 +02:00
|
|
|
wo_user = input("Enter your name: ")
|
2019-10-02 13:13:32 +02:00
|
|
|
while wo_user == "":
|
|
|
|
|
print("Unfortunately, this can't be left blank")
|
|
|
|
|
wo_user = input("Enter your name: ")
|
|
|
|
|
|
2019-08-16 23:26:23 +02:00
|
|
|
wo_email = input("Enter your email: ")
|
2019-10-02 13:13:32 +02:00
|
|
|
|
|
|
|
|
while not match(r"^[A-Za-z0-9\.\+_-]+@[A-Za-z0-9\._-]+\.[a-zA-Z]*$",
|
|
|
|
|
wo_email):
|
|
|
|
|
print("Whoops, seems like you made a typo - "
|
2020-10-22 20:39:25 +02:00
|
|
|
"the e-mail address is invalid...")
|
2019-10-02 13:13:32 +02:00
|
|
|
wo_email = input("Enter your email: ")
|
|
|
|
|
|
|
|
|
|
git.config("--global", "user.name", "{0}".format(wo_user))
|
|
|
|
|
git.config("--global", "user.email", "{0}".format(wo_email))
|
2019-08-16 23:26:23 +02:00
|
|
|
|
2019-10-23 12:24:30 +02:00
|
|
|
if not os.path.isfile('/root/.gitconfig'):
|
2019-10-30 04:23:20 +01:00
|
|
|
copy2(os.path.expanduser("~") + '/.gitconfig', '/root/.gitconfig')
|
2019-10-23 12:24:30 +02:00
|
|
|
|
2019-08-16 23:26:23 +02:00
|
|
|
# MySQL hostname
|
|
|
|
|
wo_mysql_host = ""
|
|
|
|
|
config = configparser.RawConfigParser()
|
|
|
|
|
if os.path.exists('/etc/mysql/conf.d/my.cnf'):
|
|
|
|
|
cnfpath = "/etc/mysql/conf.d/my.cnf"
|
|
|
|
|
else:
|
2019-10-30 04:23:20 +01:00
|
|
|
cnfpath = os.path.expanduser("~") + "/.my.cnf"
|
2019-08-16 23:26:23 +02:00
|
|
|
if [cnfpath] == config.read(cnfpath):
|
|
|
|
|
try:
|
|
|
|
|
wo_mysql_host = config.get('client', 'host')
|
|
|
|
|
except configparser.NoOptionError:
|
|
|
|
|
wo_mysql_host = "localhost"
|
|
|
|
|
else:
|
|
|
|
|
wo_mysql_host = "localhost"
|
|
|
|
|
|
|
|
|
|
# WordOps stack installation variables
|
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
|
|
|
# OpenLiteSpeed path constants
|
|
|
|
|
wo_ols_conf_dir = '/usr/local/lsws/conf'
|
|
|
|
|
wo_ols_vhost_dir = '/usr/local/lsws/conf/vhosts'
|
|
|
|
|
wo_ols_bin = '/usr/local/lsws/bin/openlitespeed'
|
|
|
|
|
wo_ols_ctrl = '/usr/local/lsws/bin/lswsctrl'
|
2024-06-07 14:53:50 +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
|
|
|
# OpenLiteSpeed repo and packages
|
2026-02-09 08:26:13 +01:00
|
|
|
wo_ols_repo = ("deb [signed-by=/usr/share/keyrings/openlitespeed-archive-keyring.gpg] "
|
2026-02-09 07:35:46 +01:00
|
|
|
"http://rpms.litespeedtech.com/debian/ "
|
|
|
|
|
"{0} main".format(wo_platform_codename))
|
2019-08-16 23:26:23 +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
|
|
|
wo_ols = ["openlitespeed"]
|
2026-02-09 11:44:26 +01:00
|
|
|
wo_ols_repo_key = "https://rpms.litespeedtech.com/debian/lst_repo.gpg"
|
2019-08-16 23:26:23 +02:00
|
|
|
|
2023-08-05 15:47:01 +02:00
|
|
|
wo_php_versions = {
|
|
|
|
|
'php74': '7.4',
|
|
|
|
|
'php80': '8.0',
|
|
|
|
|
'php81': '8.1',
|
|
|
|
|
'php82': '8.2',
|
2023-11-23 21:33:09 +01:00
|
|
|
'php83': '8.3',
|
2024-12-03 14:08:19 +01:00
|
|
|
'php84': '8.4',
|
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
|
|
|
'php85': '8.5',
|
2023-08-05 15:47:01 +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
|
|
|
def generate_lsphp_modules(version_prefix, version_number):
|
|
|
|
|
"""Generate LSPHP module package list for a given PHP version.
|
|
|
|
|
LSPHP packages use lsphpXX- naming (no dot in version)."""
|
|
|
|
|
short_ver = version_number.replace('.', '')
|
|
|
|
|
wo_module = ["common", "curl", "gd", "igbinary",
|
2023-08-05 17:31:10 +02:00
|
|
|
"imagick", "imap", "intl", "mbstring", "memcached", "msgpack",
|
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
|
|
|
"mysql", "opcache", "redis", "soap",
|
2023-08-05 17:31:10 +02:00
|
|
|
"xml", "zip"]
|
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
|
|
|
|
|
|
|
|
# lsphp packages: lsphpXX, lsphpXX-common, lsphpXX-curl, etc.
|
|
|
|
|
php_modules = ["lsphp{0}".format(short_ver)]
|
|
|
|
|
php_modules.extend(["lsphp{0}-{1}".format(short_ver, module) for module in wo_module])
|
2023-08-05 17:31:10 +02:00
|
|
|
|
2024-05-29 02:00:50 +02:00
|
|
|
if version_prefix == 'php74':
|
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
|
|
|
php_modules.extend(["lsphp{0}-json".format(short_ver)])
|
2023-08-05 17:31:10 +02:00
|
|
|
|
|
|
|
|
return php_modules
|
|
|
|
|
|
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
|
|
|
wo_php74 = generate_lsphp_modules('php74', '7.4')
|
|
|
|
|
wo_php80 = generate_lsphp_modules('php80', '8.0')
|
|
|
|
|
wo_php81 = generate_lsphp_modules('php81', '8.1')
|
|
|
|
|
wo_php82 = generate_lsphp_modules('php82', '8.2')
|
|
|
|
|
wo_php83 = generate_lsphp_modules('php83', '8.3')
|
|
|
|
|
wo_php84 = generate_lsphp_modules('php84', '8.4')
|
|
|
|
|
wo_php85 = generate_lsphp_modules('php85', '8.5')
|
2019-12-03 19:48:18 +01:00
|
|
|
|
2020-10-12 10:20:03 +02:00
|
|
|
wo_php_extra = ["graphviz"]
|
2019-08-16 23:26:23 +02:00
|
|
|
|
2020-10-28 11:45:30 +01:00
|
|
|
wo_mysql = [
|
|
|
|
|
"mariadb-server", "percona-toolkit",
|
|
|
|
|
"mariadb-common", "python3-mysqldb"]
|
2019-10-12 11:07:25 +02:00
|
|
|
if wo_distro == 'raspbian':
|
2023-08-05 17:31:10 +02:00
|
|
|
mariadb_ver = '10.3'
|
2026-02-09 11:39:33 +01:00
|
|
|
elif wo_platform_codename == 'trixie':
|
|
|
|
|
mariadb_ver = ''
|
|
|
|
|
wo_mysql = wo_mysql + ["mariadb-backup"]
|
2019-09-06 13:17:37 +02:00
|
|
|
else:
|
2024-06-08 14:27:16 +02:00
|
|
|
mariadb_ver = '11.4'
|
2020-10-28 11:45:30 +01:00
|
|
|
wo_mysql = wo_mysql + ["mariadb-backup"]
|
2019-09-06 13:17:37 +02:00
|
|
|
|
2020-10-28 11:45:30 +01:00
|
|
|
wo_mysql_client = ["mariadb-client", "python3-mysqldb"]
|
2019-08-16 23:26:23 +02:00
|
|
|
|
|
|
|
|
wo_fail2ban = ["fail2ban"]
|
2019-08-31 12:18:16 +02:00
|
|
|
wo_clamav = ["clamav", "clamav-freshclam"]
|
2019-08-16 23:26:23 +02:00
|
|
|
|
2019-11-11 19:06:11 +01:00
|
|
|
# APT repositories
|
2026-02-09 11:39:33 +01:00
|
|
|
if mariadb_ver:
|
|
|
|
|
wo_mysql_repo = ("deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] "
|
|
|
|
|
"http://deb.mariadb.org/"
|
|
|
|
|
f"{mariadb_ver}/{wo_distro} {wo_platform_codename} main")
|
|
|
|
|
else:
|
|
|
|
|
# trixie: use native Debian mariadb packages, no external repo
|
|
|
|
|
wo_mysql_repo = ""
|
2024-06-07 14:53:50 +02:00
|
|
|
mariadb_repo_key = "https://mariadb.org/mariadb_release_signing_key.pgp"
|
2019-08-16 23:26:23 +02:00
|
|
|
if wo_distro == 'ubuntu':
|
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
|
|
|
# LSPHP comes from LiteSpeed repo (same as OLS)
|
|
|
|
|
wo_php_repo = wo_ols_repo
|
2019-09-23 12:24:10 +02:00
|
|
|
wo_goaccess_repo = ("ppa:alex-p/goaccess")
|
2019-08-16 23:26:23 +02: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
|
|
|
# LSPHP comes from LiteSpeed repo (same as OLS)
|
|
|
|
|
wo_php_repo = wo_ols_repo
|
|
|
|
|
wo_php_key = wo_ols_repo_key
|
2022-10-20 12:55:51 +02:00
|
|
|
wo_redis_key_url = "https://packages.redis.io/gpg"
|
2024-06-07 14:53:50 +02:00
|
|
|
wo_redis_repo = (
|
|
|
|
|
"deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] "
|
|
|
|
|
f"https://packages.redis.io/deb {wo_platform_codename} main")
|
2019-08-16 23:26:23 +02:00
|
|
|
|
2019-09-04 16:55:58 +02:00
|
|
|
wo_redis = ['redis-server']
|
2019-08-16 23:26:23 +02:00
|
|
|
|
2024-05-31 22:22:08 +02:00
|
|
|
netdata_script_url = "https://get.netdata.cloud/kickstart.sh"
|
|
|
|
|
|
2019-08-16 23:26:23 +02:00
|
|
|
# Repo path
|
|
|
|
|
wo_repo_file = "wo-repo.list"
|
|
|
|
|
wo_repo_file_path = ("/etc/apt/sources.list.d/" + wo_repo_file)
|
|
|
|
|
|
|
|
|
|
# Application dabase file path
|
|
|
|
|
basedir = os.path.abspath(os.path.dirname('/var/lib/wo/'))
|
|
|
|
|
wo_db_uri = 'sqlite:///' + os.path.join(basedir, 'dbase.db')
|
|
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
|
pass
|