Out of memory fix

main
Anthony 2026-02-06 23:41:31 +08:00
parent e6ae58a239
commit 20d3d016c2
1 changed files with 7 additions and 7 deletions

View File

@ -910,17 +910,17 @@ if [[ "$SSL_SKIPPED" != "true" ]]; then
# Install certbot if not present # Install certbot if not present
if ! command_exists certbot; then if ! command_exists certbot; then
info "Installing certbot for Let's Encrypt certificate management..." 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 # Debian/Ubuntu
sudo apt-get update -qq 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 elif command_exists yum; then
# CentOS/RHEL 7 # CentOS/RHEL 7
sudo yum install -y epel-release sudo yum install -y epel-release || warning "Failed to install epel-release, continuing..."
sudo yum install -y certbot python3-certbot-apache || error_exit "Failed to install certbot via yum" sudo yum install -y certbot || warning "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"
else else
warning "Package manager not detected. Please install certbot manually." 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" info "You can install certbot using: wget https://dl.eff.org/certbot-auto && chmod a+x certbot-auto"