From 010c3d2b2dcbefbbb84e52aaf39df510c36a43d3 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Mon, 16 Oct 2023 00:36:56 +0900 Subject: [PATCH] Update comments Fix SSL certificate default is ECC issue --- README.md | 15 ++++++++------- conf/lamp | 22 +++++++++++++++++----- lamp.sh | 2 +- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 99ef8d7..1c68dd9 100644 --- a/README.md +++ b/README.md @@ -24,19 +24,20 @@ ## Supported System - Amazon Linux 2 -- AlmaLinux 8 (recommend) -- AlmaLinux 9 +- AlmaLinux 8 +- AlmaLinux 9 (recommend) - CentOS 7 - CentOS Stream 8 - CentOS Stream 9 -- Rocky Linux 8 (recommend) -- Rocky Linux 9 +- Rocky Linux 8 +- Rocky Linux 9 (recommend) - Debian 9 - Debian 10 -- Debian 11 (recommend) +- Debian 11 +- Debian 12 (recommend) - Ubuntu 18.04 -- Ubuntu 20.04 (recommend) -- Ubuntu 22.04 +- Ubuntu 20.04 +- Ubuntu 22.04 (recommend) ## Supported Software diff --git a/conf/lamp b/conf/lamp index f4d6e18..61915d0 100644 --- a/conf/lamp +++ b/conf/lamp @@ -353,8 +353,14 @@ add_letsencrypt() { . /usr/local/acme.sh/acme.sh.env /usr/local/acme.sh/acme.sh --issue --server letsencrypt ${letsdomain} -w ${website_root} if [ $? -eq 0 ]; then - ssl_certificate="${apache_location}/conf/ssl/${main_domain}/fullchain.cer" - ssl_certificate_key="${apache_location}/conf/ssl/${main_domain}/${main_domain}.key" + if [ -s "${apache_location}/conf/ssl/${main_domain}/fullchain.cer" ]; then + ssl_certificate="${apache_location}/conf/ssl/${main_domain}/fullchain.cer" + ssl_certificate_key="${apache_location}/conf/ssl/${main_domain}/${main_domain}.key" + fi + if [ -s "${apache_location}/conf/ssl/${main_domain}_ecc/fullchain.cer" ]; then + ssl_certificate="${apache_location}/conf/ssl/${main_domain}_ecc/fullchain.cer" + ssl_certificate_key="${apache_location}/conf/ssl/${main_domain}_ecc/${main_domain}.key" + fi _info "Created Let's Encrypt SSL Certificate success" else _error "Error: Create Let's Encrypt SSL Certificate failed" @@ -370,8 +376,14 @@ add_buypass() { . /usr/local/acme.sh/acme.sh.env /usr/local/acme.sh/acme.sh -m ${email} --issue --server buypass ${letsdomain} -w ${website_root} --days 170 if [ $? -eq 0 ]; then - ssl_certificate="${apache_location}/conf/ssl/${main_domain}/fullchain.cer" - ssl_certificate_key="${apache_location}/conf/ssl/${main_domain}/${main_domain}.key" + if [ -s "${apache_location}/conf/ssl/${main_domain}/fullchain.cer" ]; then + ssl_certificate="${apache_location}/conf/ssl/${main_domain}/fullchain.cer" + ssl_certificate_key="${apache_location}/conf/ssl/${main_domain}/${main_domain}.key" + fi + if [ -s "${apache_location}/conf/ssl/${main_domain}_ecc/fullchain.cer" ]; then + ssl_certificate="${apache_location}/conf/ssl/${main_domain}_ecc/fullchain.cer" + ssl_certificate_key="${apache_location}/conf/ssl/${main_domain}_ecc/${main_domain}.key" + fi _info "Created Buypass.com SSL Certificate success" else _error "Error: Create Buypass.com SSL Certificate failed" @@ -482,7 +494,7 @@ Options: } display_version() { - echo "Version: $(_green 20230615)" + echo "Version: $(_green 20231015)" } #Run it diff --git a/lamp.sh b/lamp.sh index 11e14c2..7c0b848 100644 --- a/lamp.sh +++ b/lamp.sh @@ -30,7 +30,7 @@ include() { } version() { - _info "Version: $(_green 20230615)" + _info "Version: $(_green 20231015)" } show_parameters() {