Skip to content

Commit 945c7f3

Browse files
committed
fix: do not remove default cert symlink
1 parent 9f78d10 commit 945c7f3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/letsencrypt_service

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ function cleanup_links {
5656
local -a SYMLINKED_DOMAINS
5757
local -a DISABLED_DOMAINS
5858

59-
# Create an array containing domains for which a
60-
# symlinked private key exists in /etc/nginx/certs.
59+
# Create an array containing domains for which a symlinked certificate
60+
# exists in /etc/nginx/certs (excluding default cert).
6161
for symlinked_domain in /etc/nginx/certs/*.crt; do
6262
[[ -L "$symlinked_domain" ]] || continue
6363
symlinked_domain="${symlinked_domain##*/}"
6464
symlinked_domain="${symlinked_domain%*.crt}"
65+
[[ "$symlinked_domain" != "default" ]] || continue
6566
SYMLINKED_DOMAINS+=("$symlinked_domain")
6667
done
6768
[[ "$DEBUG" == 1 ]] && echo "Symlinked domains: ${SYMLINKED_DOMAINS[*]}"

0 commit comments

Comments
 (0)