Merge aafcfeb68a968c905a0ae799976872572ae28cdf into 3d8b682380773f01df0e5abc2ef582c30c663010

This commit is contained in:
Oliver Blaha 2025-06-03 10:18:44 +12:00 committed by GitHub
commit 19a3cd4dca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

21
acme.sh
View File

@ -5899,6 +5899,16 @@ installcert() {
_installcert "$_main_domain" "$_real_cert" "$_real_key" "$_real_ca" "$_real_fullchain" "$_reload_cmd"
}
_checkSkip() {
_src="$1"
_dst="$2"
if [ ! "$_dst" ]; then return 0; fi
if [ ! -f "$_dst" ] || [ "$_dst" -ot "$_src" ]; then return 1; fi
return 0
}
#domain cert key ca fullchain reloadcmd backup-prefix
_installcert() {
_main_domain="$1"
@ -5925,6 +5935,17 @@ _installcert() {
_real_fullchain=""
fi
if [ -z "$FORCE" ] && \
_checkSkip "$CERT_PATH" "$_real_cert" && \
_checkSkip "$CA_CERT_PATH" "$_real_ca" && \
_checkSkip "$CERT_KEY_PATH" "$_real_key" && \
_checkSkip "$CERT_FULLCHAIN_PATH" "$_real_fullchain" ; then
_info "Skip, no destination file needs an update."
_info "Add '$(__red '--force')' to force the installation."
return $RENEW_SKIP
fi
_backup_path="$DOMAIN_BACKUP_PATH/$_backup_prefix"
mkdir -p "$_backup_path"