Skip to content

Commit 7f66a58

Browse files
committed
Fix comments.
1 parent e908a65 commit 7f66a58

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

  • infra/roles/services/reverse-proxy/letsencrypt/handlers
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
- name: Bootstrap SSL
22
become_user: nginx
33
when: website.ssl and website.domain
4-
shell: |
5-
# Check if certificate exists and is self-signed
4+
shell: |-
65
if [ -f "{{ podman.volumes_dir }}/letsencrypt/conf/live/{{ website.domain }}/fullchain.pem" ]; then
7-
# Check if certificate is self-signed by looking at the issuer
8-
is_self_signed=$(openssl x509 -in "{{ podman.volumes_dir }}/letsencrypt/conf/live/{{ website.domain }}/fullchain.pem" -issuer -noout | grep -i 'CN={{ website.domain }}')
6+
is_self_signed=$(openssl x509 -in "{{ podman.volumes_dir }}/letsencrypt/conf/live/{{ website.domain }}/fullchain.pem" -issuer -noout | grep -i "CN={{ website.domain }}")
97
108
if [ -n "$is_self_signed" ]; then
11-
# Certificate is self-signed, replace with Let's Encrypt certificate
129
rm -rf {{ podman.volumes_dir }}/letsencrypt/conf/*
1310
1411
podman run \
@@ -21,7 +18,6 @@
2118
podman kill -s SIGHUP systemd-nginx
2219
fi
2320
else
24-
# No certificate exists yet, something went wrong
2521
echo "Error: Expected certificate files not found"
2622
exit 1
2723
fi

0 commit comments

Comments
 (0)