From 20d3d016c2d3965ab757ea41d02411a8f42a4250 Mon Sep 17 00:00:00 2001 From: Anthony Date: Fri, 6 Feb 2026 23:41:31 +0800 Subject: [PATCH] Out of memory fix --- scripts/install-wordpress.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/install-wordpress.sh b/scripts/install-wordpress.sh index e0d6f37..55985ce 100644 --- a/scripts/install-wordpress.sh +++ b/scripts/install-wordpress.sh @@ -910,17 +910,17 @@ if [[ "$SSL_SKIPPED" != "true" ]]; then # Install certbot if not present if ! command_exists certbot; then info "Installing certbot for Let's Encrypt certificate management..." - if command_exists apt-get; then + if command_exists dnf; then + # CentOS/RHEL 8+/Fedora/AlmaLinux (preferred) + sudo dnf install -y --setopt=install_weak_deps=False certbot || warning "Failed to install certbot via dnf" + elif command_exists apt-get; then # Debian/Ubuntu sudo apt-get update -qq - sudo apt-get install -y certbot python3-certbot-apache || error_exit "Failed to install certbot via apt-get" + sudo apt-get install -y certbot python3-certbot-apache || warning "Failed to install certbot via apt-get" elif command_exists yum; then # CentOS/RHEL 7 - sudo yum install -y epel-release - sudo yum install -y certbot python3-certbot-apache || error_exit "Failed to install certbot via yum" - elif command_exists dnf; then - # CentOS/RHEL 8+/Fedora - sudo dnf install -y certbot python3-certbot-apache || error_exit "Failed to install certbot via dnf" + sudo yum install -y epel-release || warning "Failed to install epel-release, continuing..." + sudo yum install -y certbot || warning "Failed to install certbot via yum" else warning "Package manager not detected. Please install certbot manually." info "You can install certbot using: wget https://dl.eff.org/certbot-auto && chmod a+x certbot-auto"