Skip to content

Commit 810a6cd

Browse files
committed
Don't symlink certs if simp_le errored
1 parent 40a4d9c commit 810a6cd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

app/letsencrypt_service

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,14 @@ function update_certs {
225225

226226
popd || return
227227

228-
for domain in "${!hosts_array}"; do
229-
create_links $base_domain $domain && should_reload_nginx='true'
230-
[[ $simp_le_return -eq 0 ]] && should_reload_nginx='true'
231-
done
228+
if [[ $simp_le_return -ne 2 ]]; then
229+
for domain in "${!hosts_array}"; do
230+
create_links $base_domain $domain && should_reload_nginx='true'
231+
done
232+
# Queue nginx reload if a certificate was issued or renewed
233+
[[ $simp_le_return -eq 0 ]] && should_reload_nginx='true'
234+
fi
235+
232236
done
233237

234238
cleanup_links && should_reload_nginx='true'

0 commit comments

Comments
 (0)