2025-03-21 17:29:22 +00:00
type: update
id: mbadmin
2025-03-27 16:36:52 +00:00
version: '2.6'
2025-03-21 17:29:22 +00:00
name: MB Administration
description: Mighty Box Control Panel Administration
targetNodes:
nodeGroup: cp
onInstall:
- cmd[cp]:
user: root
commands:
# Ensure all directories exist
- mkdir -p /home/litespeed/mbmanager
- mkdir -p /home/litespeed/mbmanager/relay
- mkdir -p /home/litespeed/mbmanager/ssl-manager
2025-04-02 17:55:34 +00:00
# Download WordPress Installer with path verification
- cd /home/litespeed/mbmanager
2025-03-31 17:37:54 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/install-wordpress.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f install-wordpress.sh ]; then echo "Failed to download install-wordpress.sh"; exit 1; fi
# Download main scripts with verification
2025-03-21 17:29:22 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/litespeed_fetch_settings.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f litespeed_fetch_settings.sh ]; then echo "Failed to download litespeed_fetch_settings.sh"; exit 1; fi
2025-03-21 17:29:22 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/litespeed_update_settings.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f litespeed_update_settings.sh ]; then echo "Failed to download litespeed_update_settings.sh"; exit 1; fi
2025-03-21 17:29:22 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/update_opcache_settings.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f update_opcache_settings.sh ]; then echo "Failed to download update_opcache_settings.sh"; exit 1; fi
- chmod +x *.sh
# Download relay scripts with verification
2025-03-21 17:29:22 +00:00
- cd /home/litespeed/mbmanager/relay
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/check_relay_installation.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f check_relay_installation.sh ]; then echo "Failed to download check_relay_installation.sh"; exit 1; fi
2025-03-21 17:29:22 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/check_relay_status.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f check_relay_status.sh ]; then echo "Failed to download check_relay_status.sh"; exit 1; fi
2025-03-21 17:29:22 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/disable_relay.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f disable_relay.sh ]; then echo "Failed to download disable_relay.sh"; exit 1; fi
2025-03-21 17:29:22 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/enable_relay.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f enable_relay.sh ]; then echo "Failed to download enable_relay.sh"; exit 1; fi
2025-03-21 17:29:22 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/flush_caches.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f flush_caches.sh ]; then echo "Failed to download flush_caches.sh"; exit 1; fi
2025-03-21 17:29:22 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/install_relay_ocp.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f install_relay_ocp.sh ]; then echo "Failed to download install_relay_ocp.sh"; exit 1; fi
2025-03-21 17:29:22 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/relay/uninstall_relay.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f uninstall_relay.sh ]; then echo "Failed to download uninstall_relay.sh"; exit 1; fi
- chmod +x *.sh
# Download SSL manager script with verification
2025-03-21 17:29:22 +00:00
- cd /home/litespeed/mbmanager/ssl-manager
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/ssl-manager/ssl_manager.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f ssl_manager.sh ]; then echo "Failed to download ssl_manager.sh"; exit 1; fi
2025-03-21 17:29:22 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/ssl-manager/ipchecker.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f ipchecker.sh ]; then echo "Failed to download ipchecker.sh"; exit 1; fi
2025-03-27 16:26:05 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/ssl-manager/ssl_remover.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f ssl_remover.sh ]; then echo "Failed to download ssl_remover.sh"; exit 1; fi
2025-03-27 16:26:05 +00:00
- curl -OL https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/ssl-manager/xmlchecker.sh
2025-04-02 17:55:34 +00:00
- if [ ! -f xmlchecker.sh ]; then echo "Failed to download xmlchecker.sh"; exit 1; fi
- chmod +x *.sh
2025-04-02 17:58:51 +00:00
# Install Certbot for AlmaLinux with memory constraints
- echo "Installing Certbot... (this may take a few minutes)"
- MEMFREE=$(free -m | grep "Mem:" | awk '{print $4}')
- echo "Available memory: ${MEMFREE}MB"
- if [ $MEMFREE -lt 500 ]; then
echo "Low memory detected (${MEMFREE}MB), running dnf with minimal memory usage";
dnf install -y --setopt=install_weak_deps=False --best --allowerasing certbot || echo "Certbot installation failed but continuing";
else
dnf install -y certbot || echo "Certbot installation failed but continuing";
fi
# Only install DNS plugin if certbot was installed successfully
- if command -v certbot > /dev/null; then
echo "Installing Certbot DNS plugin...";
dnf install -y --setopt=install_weak_deps=False python3-certbot-dns-cloudflare || echo "DNS plugin installation failed but continuing";
else
echo "Skipping DNS plugin installation as Certbot wasn't installed";
fi
2025-03-21 17:29:22 +00:00
menu:
- confirmText: Are you sure you want to execute this WP-CLI command?
loadingText: Executing WP-CLI command...
caption: Execute WP-CLI Command
action: dynamic_wp_cli
settings: wpCliConfig
successText: "${response.out}"
- confirmText: Are you sure you want to sync directories using rsync?
loadingText: Syncing directories...
caption: Sync Directories
action: rsync_directories
settings: rsyncConfig
successText: "Directory synchronized successfully from '${settings.old_directory}' to '/var/www/webroot/ROOT/'."
- confirmText: Are you sure you want to check relay installation?
loadingText: Checking relay installation...
caption: Check Relay Installation
action: check_relay_installation
successText: "${response.out}"
- confirmText: Are you sure you want to check relay status?
loadingText: Checking relay status...
caption: Check Relay Status
action: check_relay_status
successText: "${response.out}"
- confirmText: Are you sure you want to disable the relay?
loadingText: Disabling relay...
caption: Disable Relay
action: disable_relay
successText: "${response.out}"
- confirmText: Are you sure you want to enable the relay?
loadingText: Enabling relay...
caption: Enable Relay
action: enable_relay
successText: "${response.out}"
- confirmText: Are you sure you want to install Relay and OCP?
loadingText: Installing Relay and OCP
caption: Install Relay
action: install_relay
successText: "${response.out}"
- confirmText: Are you sure you want to flush keys for Redis and OCP?
loadingText: Clearing Keys
caption: Flush Keys
action: flush_keys
successText: "${response.out}"
- confirmText: Check the Redis Status?
loadingText: Checking Redis
caption: Check Redis Status
action: redis_status
successText: "${response.out}"
- confirmText: Are you sure you want to disable Redis?
loadingText: Disabling Redis
caption: Disable Redis
action: redis_disable
successText: "${response.out}"
- confirmText: Enable Redis?
loadingText: Enabling Redis
caption: Enable Redis
action: redis_enable
successText: "${response.out}"
- confirmText: Are you sure you want to flush keys for Redis?
loadingText: Clearing Keys
caption: Flush Keys
action: redis_clear_keys
successText: "${response.out}"
- confirmText: Do you want to export the WordPress database?
loadingText: Exporting WordPress Database...
caption: Export WordPress DB
action: export_wp_db
settings: dbExportConfig
successText: "Database exported successfully to /var/www/webroot/ROOT/${settings.db_filename}.sql"
- confirmText: Are you sure you want to import the WordPress database?
loadingText: Importing WordPress Database...
caption: Import WordPress DB
action: import_wp_db
settings: dbImportConfig
successText: "${response.out}"
- confirmText: Are you sure you want to perform a search and replace?
loadingText: Performing Search and Replace...
caption: Search and Replace URL
action: search_replace_urls
settings: searchReplaceConfig
successText: "Search and Replace completed successfully for '${settings.old_url}' with '${settings.new_url}' in all tables."
- confirmText: Are you sure you want to prepare for DB import?
loadingText: Preparing for DB import...
caption: DB Import Preparation
action: db_import_preparation
successText: "${response.out}"
- confirmText: Are you sure you want to issue an SSL certificate for this domain?
loadingText: Issuing SSL Certificate...
caption: Issue SSL Certificate
action: issue_ssl_cert
settings: sslCertConfig
successText: "SSL certificate for '${settings.domain}' has been issued successfully."
- confirmText: Check if the domain is resolving to the expected IP address?
loadingText: Checking Domain...
caption: Check Domain IP
action: check_domain_ip
settings: checkDomainConfig
successText: "${response.out}"
2025-03-21 18:22:40 +00:00
- confirmText: Are you sure you want to remove SSL certificate(s)?
loadingText: Removing SSL Certificate(s)...
caption: Remove SSL Certificate
action: remove_ssl_cert
settings: sslRemoveConfig
successText: "${response.out}"
2025-03-25 13:15:42 +00:00
- confirmText: Are you sure you want to diagnose LiteSpeed configuration?
loadingText: Analyzing configuration...
caption: Diagnose LiteSpeed Config
action: diagnose_litespeed_config
successText: "${response.out}"
2025-03-31 17:37:54 +00:00
- confirmText: Are you sure you want to install WordPress?
loadingText: Installing WordPress...
caption: Install WordPress
action: install_wordpress
settings: wpInstallConfig
successText: "WordPress installed successfully with the provided credentials."
2025-03-21 17:29:22 +00:00
settings:
checkDomainConfig:
submitUnchanged: true
fields:
- name: domain
type: text
caption: Domain Name
required: true
- name: public_ip
type: text
caption: Public IP Address
required: true
wpCliConfig:
submitUnchanged: true
fields:
- name: wp_cli_command
type: text
caption: WP-CLI Command (without 'wp' prefix)
default: "help"
rsyncConfig:
submitUnchanged: true
fields:
- name: old_directory
type: text
caption: Source Directory
required: true
searchReplaceConfig:
submitUnchanged: true
fields:
- name: old_url
type: text
caption: Old URL
required: true
- name: new_url
type: text
caption: New URL
required: true
dbImportConfig:
submitUnchanged: true
fields:
- name: db_filename
type: text
caption: Import DB Filename (without extension)
default: "wordpress_db"
dbExportConfig:
submitUnchanged: true
fields:
- name: db_filename
type: text
caption: Exported DB Filename (without extension)
default: "wordpress_db"
opcacheConfig:
submitUnchanged: true
fields:
- name: memory_consumption
type: text
caption: OPCache Memory Consumption (MB)
default: "128"
- name: interned_strings_buffer
type: text
caption: Interned Strings Buffer (MB)
default: "8"
- name: max_accelerated_files
type: text
caption: Max Accelerated Files
default: "10000"
- name: revalidate_freq
type: text
caption: Revalidate Frequency (Seconds)
default: "2"
litespeedTTL:
submitUnchanged: true
fields:
- name: sizettl
type: text
caption: Public Page Cache TTL
default: "604800"
cacheExcConfig:
submitUnchanged: true
fields:
- name: cache_exc_paths
type: text
caption: Cache Exclusion Paths
default: "/path-to-exclude"
litespeedConfig:
submitUnchanged: true
fields:
- name: TTL_PUB
type: text
caption: TTL Public (Seconds)
default: "3600"
- name: TTL_PRIV
type: text
caption: TTL Private (Seconds)
default: "1800"
- name: TTL_FRONTPAGE
type: text
caption: TTL Frontpage (Seconds)
default: "900"
- name: TTL_FEED
type: text
caption: TTL Feed (Seconds)
default: "7200"
sslCertConfig:
submitUnchanged: true
fields:
- name: public_ip
type: text
caption: Public IP Address
required: true
- name: domain
type: text
caption: Domain Name
required: true
- name: email
type: text
caption: Email Address
required: true
2025-03-21 18:22:40 +00:00
sslRemoveConfig:
submitUnchanged: true
fields:
- name: domains
type: text
caption: Comma-separated Domains
required: true
2025-03-27 16:42:13 +00:00
- name: email
type: text
caption: Email Address (Optional)
default: "${EMAIL}"
2025-03-25 13:15:42 +00:00
cleanCertConfig:
submitUnchanged: true
fields:
- name: domain
type: text
caption: Domain Name
required: true
2025-03-31 17:37:54 +00:00
wpInstallConfig:
submitUnchanged: true
fields:
- name: wpusername
type: text
caption: WordPress Admin Username
default: "admin"
required: true
- name: wppassword
type: text
caption: WordPress Admin Password
default: "admin"
required: true
- name: wpemail
type: text
caption: WordPress Admin Email
default: "admin@example.com"
required: true
2025-03-21 17:29:22 +00:00
actions:
dynamic_wp_cli:
- cmd[cp]:
user: litespeed
commands:
- cd /var/www/webroot/ROOT/
- wp ${settings.wp_cli_command}
- return:
type: info
message: "${response.out}"
rsync_directories:
- cmd[cp]:
commands:
- rsync -avz "/${settings.old_directory}/" /var/www/webroot/ROOT/
- return:
type: info
message: "Directory synchronized successfully from '${settings.old_directory}' to '/var/www/webroot/ROOT/'."
search_replace_urls:
- cmd[cp]:
user: litespeed
commands:
- cd /var/www/webroot/ROOT/
- /home/litespeed/bin/wp search-replace '${settings.old_url}' '${settings.new_url}' --all-tables
- /home/litespeed/bin/wp transient delete --all
- /home/litespeed/bin/wp cache flush
- return:
type: info
message: "Search and Replace completed successfully for '${settings.old_url}' with '${settings.new_url}' in all tables. Deleted Transients and Flushed WP Cache"
import_wp_db:
- cmd[cp]:
user: root
commands:
# Check if WP-CLI is installed
- if [ ! -f /home/litespeed/bin/wp ]; then
echo "WP-CLI not found. Installing...";
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar;
chmod +x wp-cli.phar;
mkdir -p /home/litespeed/bin;
mv wp-cli.phar /home/litespeed/bin/wp;
export PATH=$PATH:/home/litespeed/bin;
else
echo "WP-CLI is already installed.";
fi;
# Verify that WP-CLI is now available in the litespeed user's PATH and run the WP-CLI command
- cd /var/www/webroot/ROOT/
- /home/litespeed/bin/wp db import /var/www/webroot/ROOT/${settings.db_filename}.sql --allow-root
- return:
type: info
message: "${response.out}"
export_wp_db:
- cmd[cp]:
user: litespeed
commands:
- cd /var/www/webroot/ROOT/
- wp db export /var/www/webroot/ROOT/${settings.db_filename}.sql
- return:
type: info
message: "Database exported successfully to /var/www/webroot/ROOT/${settings.db_filename}.sql"
enable_opcache:
- cmd[cp]:
user: root
commands:
- OP_INI='/usr/local/lsws/lsphp/etc/php.d/10-opcache.ini'
- sed -i 's/opcache.enable=0/opcache.enable=1/' $OP_INI
- restartNodes:
- nodeGroup: "cp"
reboot: true
- return: enableSuccess
disable_opcache:
- cmd[cp]:
user: root
commands:
- OP_INI='/usr/local/lsws/lsphp/etc/php.d/10-opcache.ini'
- sed -i 's/opcache.enable=1/opcache.enable=0/' $OP_INI
- restartNodes:
- nodeGroup: "cp"
reboot: true
- return: disableSuccess
clear_opcache:
- cmd[cp]:
user: root
commands:
- echo "<?php opcache_reset(); ?>" | php
- return: clearSuccess
opcache_status:
- cmd[cp]:
user: root
commands:
- echo "<?php echo json_encode(['opcache_enabled' => opcache_get_status(false)['opcache_enabled']]); ?>" | php
- return:
type: info
message: "${response.out}"
opcache_summary:
- cmd[cp]:
user: root
commands:
- echo "<?php \$status = opcache_get_status(false); echo json_encode(['memory_usage' => \$status['memory_usage'], 'opcache_statistics' => \$status['opcache_statistics']]); ?>" | php
- return:
type: info
message: "${response.out}"
opcache_statistics:
- cmd[cp]:
user: root
commands:
- echo "<?php \$status = opcache_get_status(true); echo json_encode(['scripts' => \$status['scripts'], 'opcache_statistics' => \$status['opcache_statistics'], 'jit' => \$status['jit']]); ?>" | php
- return:
type: info
message: "${response.out}"
opcache_fetch_settings:
- cmd[cp]:
user: root
commands:
- echo "<?php \$ini = parse_ini_file('/usr/local/lsws/lsphp/etc/php.d/10-opcache.ini'); echo json_encode(['memory_consumption' => \$ini['opcache.memory_consumption'], 'interned_strings_buffer' => \$ini['opcache.interned_strings_buffer'], 'max_accelerated_files' => \$ini['opcache.max_accelerated_files'], 'revalidate_freq' => \$ini['opcache.revalidate_freq']]); ?>" | php
- return:
type: info
message: "${response.out}"
opcache_update_settings:
- cmd[cp]:
user: root
commands:
- bash /home/litespeed/mbmanager/update_opcache_settings.sh "${settings.memory_consumption}" "${settings.interned_strings_buffer}" "${settings.max_accelerated_files}" "${settings.revalidate_freq}"
- systemctl restart lsws
- restartNodes:
- nodeGroup: "cp"
reboot: true
- return:
type: info
message: "OPCache settings updated successfully."
litespeed_status:
- cmd[cp]:
commands:
- wp --path=/var/www/webroot/ROOT litespeed-option get cache
- return:
type: info
message: "${response.out}"
litespeed_enable:
- cmd[cp]:
commands:
- wp --path=/var/www/webroot/ROOT litespeed-option set cache 1
- return:
type: info
message: "LiteSpeed Enabled."
litespeed_disable:
- cmd[cp]:
commands:
- wp --path=/var/www/webroot/ROOT litespeed-option set cache 0
- return:
type: info
message: "LiteSpeed Disabled."
litespeed_purgeall:
- cmd[cp]:
commands:
- wp --path=/var/www/webroot/ROOT litespeed-purge all
- return:
type: info
message: "LiteSpeed Purged Cache."
litespeed_ver:
- cmd[cp]:
commands:
- wp --path=/var/www/webroot/ROOT litespeed-option get _version
- return:
type: info
message: "${response.out}"
litespeed_ttlpub:
- cmd[cp]:
commands:
- wp --path=/var/www/webroot/ROOT litespeed-option get cache-ttl_pub
- return:
type: info
message: "${response.out}"
litespeed_set_ttlpub:
- cmd[cp]:
commands:
- wp --path=/var/www/webroot/ROOT litespeed-option set cache-ttl_pub "${settings.sizettl}"
- return:
type: info
message: "${response.out}"
update_cache_exc:
- cmd[cp]:
commands:
- wp --path=/var/www/webroot/ROOT litespeed-option set cache-exc "${settings.cache_exc_paths}"
- return:
type: info
message: "${response.out}"
get_litespeed_ttl_values:
- cmd[cp]:
commands:
2025-04-02 17:55:34 +00:00
- bash /home/litespeed/mbmanager/litespeed_fetch_settings.sh
2025-03-21 17:29:22 +00:00
- return:
type: info
message: "${response.out}"
litespeed_update_settings:
- cmd[cp]:
commands:
2025-04-02 17:55:34 +00:00
- bash /home/litespeed/mbmanager/litespeed_update_settings.sh "${settings.TTL_PUB}" "${settings.TTL_PRIV}" "${settings.TTL_FRONTPAGE}" "${settings.TTL_FEED}"
2025-03-21 17:29:22 +00:00
- restartNodes:
- nodeGroup: "cp"
reboot: true
- return:
type: info
message: "LiteSpeed cache settings updated successfully."
check_relay_installation:
- cmd[cp]:
user: root
commands:
2025-04-02 17:55:34 +00:00
- bash /home/litespeed/mbmanager/relay/check_relay_installation.sh
2025-03-21 17:29:22 +00:00
- return:
type: info
message: "${response.out}"
check_relay_status:
- cmd[cp]:
user: root
commands:
2025-04-02 17:55:34 +00:00
- bash /home/litespeed/mbmanager/relay/check_relay_status.sh
2025-03-21 17:29:22 +00:00
- return:
type: info
message: "${response.out}"
disable_relay:
- cmd[cp]:
user: root
commands:
2025-04-02 17:55:34 +00:00
- bash /home/litespeed/mbmanager/relay/disable_relay.sh
2025-03-21 17:29:22 +00:00
- return:
type: info
message: "${response.out}"
enable_relay:
- cmd[cp]:
user: root
commands:
2025-04-02 17:55:34 +00:00
- bash /home/litespeed/mbmanager/relay/enable_relay.sh
2025-03-21 17:29:22 +00:00
- return:
type: info
message: "${response.out}"
install_relay:
- cmd[cp]:
commands:
2025-04-02 17:55:34 +00:00
- bash /home/litespeed/mbmanager/relay/install_relay_ocp.sh
2025-03-21 17:29:22 +00:00
- return:
type: info
message: "${response.out}"
flush_keys:
- cmd[cp]:
commands:
2025-04-02 17:55:34 +00:00
- bash /home/litespeed/mbmanager/relay/flush_caches.sh
2025-03-21 17:29:22 +00:00
- return:
type: info
message: "${response.out}"
redis_status:
- cmd[cp]:
commands:
- sudo systemctl list-units --type=service | grep redis
- return:
type: info
message: "${response.out}"
redis_disable:
- cmd[cp]:
commands:
- sudo systemctl stop redis
- return:
type: info
message: "Redis has been stopped successfully"
redis_enable:
- cmd[cp]:
commands:
- sudo systemctl restart redis
- return:
type: info
message: "Redis has been successfully restarted"
redis_clear_keys:
- cmd[cp]:
commands:
- redis-cli -s /var/run/redis/redis.sock FLUSHALL
- return:
type: info
message: "${response.out}"
db_import_preparation:
- cmd[cp]:
user: root
commands:
- if [ ! -f /home/litespeed/mbmanager/dbPreparation.sh ]; then
echo "dbPreparation.sh not found. Downloading the script...";
mkdir -p /home/litespeed/mbmanager;
curl -o /home/litespeed/mbmanager/dbPreparation.sh https://deploy-proxy.mightybox.io/tony/mb-admin/raw/branch/main/scripts/dbPreparation.sh;
chmod +x /home/litespeed/mbmanager/dbPreparation.sh;
else
echo "dbPreparation.sh already exists. Running the script...";
fi;
- /home/litespeed/mbmanager/dbPreparation.sh
- return:
type: info
message: "${response.out}"
issue_ssl_cert:
- cmd[cp]:
user: root
commands:
2025-03-27 16:26:05 +00:00
- bash /home/litespeed/mbmanager/ssl-manager/ssl_manager.sh --public-ip="${settings.public_ip}" --domain="${settings.domain}" --email="${settings.email}" --verbose
2025-03-21 17:29:22 +00:00
- return:
type: info
2025-03-27 16:26:05 +00:00
message: "SSL certificate issuance process completed."
2025-03-21 17:29:22 +00:00
check_domain_ip:
- cmd[cp]:
user: root
commands:
- bash /home/litespeed/mbmanager/ssl-manager/ipchecker.sh -d "${settings.domain}" -i "${settings.public_ip}"
- return:
type: info
message: "${response.out}"
2025-03-21 18:22:40 +00:00
remove_ssl_cert:
- cmd[cp]:
user: root
commands:
2025-03-27 18:01:33 +00:00
- if [ -n "${settings.email}" ]; then
bash /home/litespeed/mbmanager/ssl-manager/ssl_remover.sh --domains="${settings.domain}" --verbose --email="${settings.email}"
else
bash /home/litespeed/mbmanager/ssl-manager/ssl_remover.sh --domains="${settings.domain}" --verbose
fi
2025-03-21 18:22:40 +00:00
- return:
type: info
2025-03-27 16:26:05 +00:00
message: "SSL certificate removal process completed."
2025-03-25 12:55:20 +00:00
diagnose_litespeed_config:
- cmd[cp]:
user: root
commands:
2025-03-27 16:26:05 +00:00
- bash /home/litespeed/mbmanager/ssl-manager/xmlchecker.sh --verbose
2025-03-25 13:09:26 +00:00
- return:
type: info
message: "${response.out}"
2025-03-31 17:37:54 +00:00
install_wordpress:
- cmd[cp]:
user: root
commands:
2025-04-04 17:15:51 +00:00
commands:
- cd /var/www/webroot/ROOT && /home/litespeed/mbmanager/install-wordpress.sh --wpusername="${settings.wpusername}" --wppassword="${settings.wppassword}" --wpemail="${settings.wpemail}" --reset-db-root-pass
2025-03-31 17:37:54 +00:00
- return:
type: info
message: "${response.out}"
2025-03-21 17:29:22 +00:00
responses:
enableSuccess:
type: success
message: "OPCache enabled successfully."
disableSuccess:
type: success
message: "OPCache disabled successfully."
clearSuccess:
type: success
message: "OPCache cleared successfully."
buttons:
- settings: opcacheConfig
action: opcache_update_settings
caption: Update OPCache Settings
submitButtonText: Update OpCache
- settings: litespeedTTL
action: litespeed_set_ttlpub
caption: Change TTL for cache-ttl_pub in seconds
submitButtonText: Update TTL
- settings: cacheExcConfig
action: update_cache_exc
caption: Update Cache Exclusion Paths
submitButtonText: Update Paths
- settings: litespeedConfig
action: litespeed_update_settings
caption: Update LiteSpeed Cache Settings
submitButtonText: Update Cache Settings
2025-03-21 18:22:40 +00:00
- settings: sslRemoveConfig
action: remove_ssl_cert
caption: Remove SSL Certificates
submitButtonText: Remove Certificates
2025-03-21 17:29:22 +00:00
onUninstall:
- cmd[cp]:
user: root
commands:
# Remove all installed scripts
- rm -rf /home/litespeed/mbmanager/ssl-manager/*
- rm -rf /home/litespeed/mbmanager/relay/*
- rm -rf /home/litespeed/mbmanager/*
# Remove the parent directory if empty
- rmdir --ignore-fail-on-non-empty /home/litespeed/mbmanager || true
# Uninstall Certbot if no longer needed
2025-01-29 13:03:24 +00:00
- if command -v certbot > /dev/null; then dnf remove -y certbot python3-certbot-dns-cloudflare; fi