File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -53,12 +53,16 @@ create-initial-cert-{{ setname }}-{{ domainlist | join('+') }}:
53
53
- cwd: {{ letsencrypt.cli_install_dir }}
54
54
{% endif % }
55
55
- unless:
56
+ {% if letsencrypt.use_package % }
56
57
- fun: cmd.run
57
58
python_shell: true
58
59
cmd: |
59
60
{{ check_cert_cmd }} {{ setname }} \
60
61
- d {{ domainlist| join(' -d ' ) }} | \
61
62
/ bin / grep - q " Certificate Name: {{ setname }} "
63
+ {% else % }
64
+ - {{ check_cert_cmd }} {{ setname }} {{ domainlist | join(' ' ) }}
65
+ {% endif % }
62
66
- require:
63
67
{% if letsencrypt.use_package % }
64
68
- pkg: letsencrypt- client
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
{% from " letsencrypt/map.jinja" import letsencrypt with context %}
3
3
4
- FIRST_CERT =$1
5
-
4
+ CERT_NAME =$1
5
+ shift
6
6
for DOMAIN in " $@ "
7
7
do
8
- openssl x509 -in {{ letsencrypt.config_dir.path }}/live/$FIRST_CERT /cert.pem -noout -text | grep DNS:${DOMAIN} > /dev/null || exit 1
8
+ openssl x509 -in {{ letsencrypt.config_dir.path }}/live/$CERT_NAME /cert.pem -noout -text | grep DNS:${DOMAIN} > /dev/null || exit 1
9
9
done
10
- CERT=$( date -d " $( openssl x509 -in {{ letsencrypt.config_dir.path }}/live/$FIRST_CERT /cert.pem -enddate -noout | cut -d' =' -f2) " " +%s" )
10
+ CERT=$( date -d " $( openssl x509 -in {{ letsencrypt.config_dir.path }}/live/$CERT_NAME /cert.pem -enddate -noout | cut -d' =' -f2) " " +%s" )
11
11
CURRENT=$( date " +%s" )
12
12
REMAINING=$(( ($CERT - $CURRENT ) / 60 / 60 / 24 ))
13
13
[ " $REMAINING " -gt " 30" ] || exit 1
You can’t perform that action at this time.
0 commit comments