NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Trace

data/Dockerfiles/acme/obtain-certificate-dns.sh

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

obtain-certificate-dns.sh on main
Author Date Commit Line Code
Carlos 8 months ago a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
1
#!/bin/bash
Open commit View diff
1 #!/bin/bash
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
2
Open commit View diff
2
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
3
# Return values / exit codes
Open commit View diff
3 # Return values / exit codes
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
4
# 0 = cert created successfully
Open commit View diff
4 # 0 = cert created successfully
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
5
# 1 = cert renewed successfully
Open commit View diff
5 # 1 = cert renewed successfully
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
6
# 2 = cert not due for renewal
Open commit View diff
6 # 2 = cert not due for renewal
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
7
# * = errors
Open commit View diff
7 # * = errors
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
8
Open commit View diff
8
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
9
source /srv/functions.sh
Open commit View diff
9 source /srv/functions.sh
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
10
Open commit View diff
10
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
11
CERT_DOMAINS=(${DOMAINS[@]})
Open commit View diff
11 CERT_DOMAINS=(${DOMAINS[@]})
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
12
CERT_DOMAIN=${CERT_DOMAINS[0]}
Open commit View diff
12 CERT_DOMAIN=${CERT_DOMAINS[0]}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
13
ACME_BASE=/var/lib/acme
Open commit View diff
13 ACME_BASE=/var/lib/acme
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
14
Open commit View diff
14
FreddleSpl0it 5 months ago 8f883f3

Rename dns-101 to dns-01

Full commit hash
8f883f3d374b4de9b3ad731d3bef5d667b095ae8
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
15
# Load optional DNS provider secrets from /etc/acme/dns-01.conf
Open commit View diff
15 # Load optional DNS provider secrets from /etc/acme/dns-01.conf
Carlos 8 months ago 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
16
if [[ -f /srv/load-dns-config.sh ]]; then
Open commit View diff
16 if [[ -f /srv/load-dns-config.sh ]]; then
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
17
  source /srv/load-dns-config.sh
Open commit View diff
17 source /srv/load-dns-config.sh
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
18
  if declare -F log_f >/dev/null; then
Open commit View diff
18 if declare -F log_f >/dev/null; then
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
19
    log_f "ACME_DNS_CHALLENGE is enabled, DNS provider secrets loaded"
Open commit View diff
19 log_f "ACME_DNS_CHALLENGE is enabled, DNS provider secrets loaded"
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
20
  fi
Open commit View diff
20 fi
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
21
fi
Open commit View diff
21 fi
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
22
Open commit View diff
22
Carlos 8 months ago a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
23
TYPE=${1}
Open commit View diff
23 TYPE=${1}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
24
PREFIX=""
Open commit View diff
24 PREFIX=""
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
25
# only support rsa certificates for now
Open commit View diff
25 # only support rsa certificates for now
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
26
if [[ "${TYPE}" != "rsa" ]]; then
Open commit View diff
26 if [[ "${TYPE}" != "rsa" ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
27
  log_f "Unknown certificate type '${TYPE}' requested"
Open commit View diff
27 log_f "Unknown certificate type '${TYPE}' requested"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
28
  exit 5
Open commit View diff
28 exit 5
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
29
fi
Open commit View diff
29 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
30
Open commit View diff
30
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
31
if [[ -z "${ACME_DNS_PROVIDER}" ]]; then
Open commit View diff
31 if [[ -z "${ACME_DNS_PROVIDER}" ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
32
  log_f "ACME_DNS_PROVIDER is required when ACME_DNS_CHALLENGE is enabled"
Open commit View diff
32 log_f "ACME_DNS_PROVIDER is required when ACME_DNS_CHALLENGE is enabled"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
33
  exit 6
Open commit View diff
33 exit 6
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
34
fi
Open commit View diff
34 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
35
Open commit View diff
35
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
36
DOMAINS_FILE=${ACME_BASE}/${CERT_DOMAIN}/domains
Open commit View diff
36 DOMAINS_FILE=${ACME_BASE}/${CERT_DOMAIN}/domains
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
37
CERT=${ACME_BASE}/${CERT_DOMAIN}/${PREFIX}cert.pem
Open commit View diff
37 CERT=${ACME_BASE}/${CERT_DOMAIN}/${PREFIX}cert.pem
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
38
SHARED_KEY=${ACME_BASE}/acme/${PREFIX}key.pem  # must already exist
Open commit View diff
38 SHARED_KEY=${ACME_BASE}/acme/${PREFIX}key.pem # must already exist
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
39
KEY=${ACME_BASE}/${CERT_DOMAIN}/${PREFIX}key.pem
Open commit View diff
39 KEY=${ACME_BASE}/${CERT_DOMAIN}/${PREFIX}key.pem
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
40
CSR=${ACME_BASE}/${CERT_DOMAIN}/${PREFIX}acme.csr
Open commit View diff
40 CSR=${ACME_BASE}/${CERT_DOMAIN}/${PREFIX}acme.csr
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
41
Open commit View diff
41
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
42
if [[ -z ${CERT_DOMAINS[*]} ]]; then
Open commit View diff
42 if [[ -z ${CERT_DOMAINS[*]} ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
43
  log_f "Missing CERT_DOMAINS to obtain a certificate"
Open commit View diff
43 log_f "Missing CERT_DOMAINS to obtain a certificate"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
44
  exit 3
Open commit View diff
44 exit 3
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
45
fi
Open commit View diff
45 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
46
Open commit View diff
46
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
47
if [[ "${LE_STAGING}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
Open commit View diff
47 if [[ "${LE_STAGING}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
48
  if [[ ! -z "${DIRECTORY_URL}" ]]; then
Open commit View diff
48 if [[ ! -z "${DIRECTORY_URL}" ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
49
    log_f "Cannot use DIRECTORY_URL with LE_STAGING=y - ignoring DIRECTORY_URL"
Open commit View diff
49 log_f "Cannot use DIRECTORY_URL with LE_STAGING=y - ignoring DIRECTORY_URL"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
50
  fi
Open commit View diff
50 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
51
  log_f "Using Let's Encrypt staging servers"
Open commit View diff
51 log_f "Using Let's Encrypt staging servers"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
52
  ACME_SH_SERVER_ARGS=("--staging")
Open commit View diff
52 ACME_SH_SERVER_ARGS=("--staging")
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
53
elif [[ ! -z "${DIRECTORY_URL}" ]]; then
Open commit View diff
53 elif [[ ! -z "${DIRECTORY_URL}" ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
54
  log_f "Using custom directory URL ${DIRECTORY_URL}"
Open commit View diff
54 log_f "Using custom directory URL ${DIRECTORY_URL}"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
55
  ACME_SH_SERVER_ARGS=("--server" "${DIRECTORY_URL}")
Open commit View diff
55 ACME_SH_SERVER_ARGS=("--server" "${DIRECTORY_URL}")
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
56
else
Open commit View diff
56 else
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
57
  log_f "Using Let's Encrypt production servers"
Open commit View diff
57 log_f "Using Let's Encrypt production servers"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
58
  ACME_SH_SERVER_ARGS=("--server" "letsencrypt")
Open commit View diff
58 ACME_SH_SERVER_ARGS=("--server" "letsencrypt")
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
59
fi
Open commit View diff
59 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
60
Open commit View diff
60
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
61
if [[ -f ${DOMAINS_FILE} && "$(cat ${DOMAINS_FILE})" ==  "${CERT_DOMAINS[*]}" ]]; then
Open commit View diff
61 if [[ -f ${DOMAINS_FILE} && "$(cat ${DOMAINS_FILE})" == "${CERT_DOMAINS[*]}" ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
62
  if [[ ! -f ${CERT} || ! -f "${KEY}" || -f "${ACME_BASE}/force_renew" ]]; then
Open commit View diff
62 if [[ ! -f ${CERT} || ! -f "${KEY}" || -f "${ACME_BASE}/force_renew" ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
63
    log_f "Certificate ${CERT} doesn't exist yet or forced renewal - start obtaining"
Open commit View diff
63 log_f "Certificate ${CERT} doesn't exist yet or forced renewal - start obtaining"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
64
  elif ! openssl x509 -checkend 2592000 -noout -in ${CERT} > /dev/null; then
Open commit View diff
64 elif ! openssl x509 -checkend 2592000 -noout -in ${CERT} > /dev/null; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
65
    log_f "Certificate ${CERT} is due for renewal (< 30 days) - start renewing"
Open commit View diff
65 log_f "Certificate ${CERT} is due for renewal (< 30 days) - start renewing"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
66
  else
Open commit View diff
66 else
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
67
    log_f "Certificate ${CERT} validation done, neither changed nor due for renewal."
Open commit View diff
67 log_f "Certificate ${CERT} validation done, neither changed nor due for renewal."
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
68
    exit 2
Open commit View diff
68 exit 2
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
69
  fi
Open commit View diff
69 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
70
else
Open commit View diff
70 else
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
71
  log_f "Certificate ${CERT} missing or changed domains '${CERT_DOMAINS[*]}' - start obtaining"
Open commit View diff
71 log_f "Certificate ${CERT} missing or changed domains '${CERT_DOMAINS[*]}' - start obtaining"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
72
fi
Open commit View diff
72 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
73
Open commit View diff
73
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
74
# Make backup
Open commit View diff
74 # Make backup
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
75
if [[ -f ${CERT} ]]; then
Open commit View diff
75 if [[ -f ${CERT} ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
76
  DATE=$(date +%Y-%m-%d_%H_%M_%S)
Open commit View diff
76 DATE=$(date +%Y-%m-%d_%H_%M_%S)
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
77
  BACKUP_DIR=${ACME_BASE}/backups/${CERT_DOMAIN}/${PREFIX}${DATE}
Open commit View diff
77 BACKUP_DIR=${ACME_BASE}/backups/${CERT_DOMAIN}/${PREFIX}${DATE}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
78
  log_f "Creating backups in ${BACKUP_DIR} ..."
Open commit View diff
78 log_f "Creating backups in ${BACKUP_DIR} ..."
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
79
  mkdir -p ${BACKUP_DIR}/
Open commit View diff
79 mkdir -p ${BACKUP_DIR}/
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
80
  [[ -f ${DOMAINS_FILE} ]] && cp ${DOMAINS_FILE} ${BACKUP_DIR}/
Open commit View diff
80 [[ -f ${DOMAINS_FILE} ]] && cp ${DOMAINS_FILE} ${BACKUP_DIR}/
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
81
  [[ -f ${CERT} ]] && cp ${CERT} ${BACKUP_DIR}/
Open commit View diff
81 [[ -f ${CERT} ]] && cp ${CERT} ${BACKUP_DIR}/
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
82
  [[ -f ${KEY} ]] && cp ${KEY} ${BACKUP_DIR}/
Open commit View diff
82 [[ -f ${KEY} ]] && cp ${KEY} ${BACKUP_DIR}/
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
83
  [[ -f ${CSR} ]] && cp ${CSR} ${BACKUP_DIR}/
Open commit View diff
83 [[ -f ${CSR} ]] && cp ${CSR} ${BACKUP_DIR}/
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
84
fi
Open commit View diff
84 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
85
Open commit View diff
85
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
86
mkdir -p ${ACME_BASE}/${CERT_DOMAIN}
Open commit View diff
86 mkdir -p ${ACME_BASE}/${CERT_DOMAIN}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
87
if [[ ! -f ${KEY} ]]; then
Open commit View diff
87 if [[ ! -f ${KEY} ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
88
  log_f "Copying shared private key for this certificate..."
Open commit View diff
88 log_f "Copying shared private key for this certificate..."
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
89
  cp ${SHARED_KEY} ${KEY}
Open commit View diff
89 cp ${SHARED_KEY} ${KEY}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
90
  chmod 600 ${KEY}
Open commit View diff
90 chmod 600 ${KEY}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
91
fi
Open commit View diff
91 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
92
Open commit View diff
92
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
93
# Generating CSR to keep layout parity with HTTP challenge flow
Open commit View diff
93 # Generating CSR to keep layout parity with HTTP challenge flow
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
94
printf "[SAN]\nsubjectAltName=" > /tmp/_SAN
Open commit View diff
94 printf "[SAN]\nsubjectAltName=" > /tmp/_SAN
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
95
printf "DNS:%s," "${CERT_DOMAINS[@]}" >> /tmp/_SAN
Open commit View diff
95 printf "DNS:%s," "${CERT_DOMAINS[@]}" >> /tmp/_SAN
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
96
sed -i '$s/,$//' /tmp/_SAN
Open commit View diff
96 sed -i '$s/,$//' /tmp/_SAN
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
97
openssl req -new -sha256 -key ${KEY} -subj "/" -reqexts SAN -config <(cat "$(openssl version -d | sed 's/.*\"\(.*\)\"/\1/g')/openssl.cnf" /tmp/_SAN) > ${CSR}
Open commit View diff
97 openssl req -new -sha256 -key ${KEY} -subj "/" -reqexts SAN -config <(cat "$(openssl version -d | sed 's/.*\"\(.*\)\"/\1/g')/openssl.cnf" /tmp/_SAN) > ${CSR}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
98
Open commit View diff
98
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
99
log_f "Checking resolver..."
Open commit View diff
99 log_f "Checking resolver..."
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
100
until dig letsencrypt.org +time=3 +tries=1 @unbound > /dev/null; do
Open commit View diff
100 until dig letsencrypt.org +time=3 +tries=1 @unbound > /dev/null; do
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
101
  sleep 2
Open commit View diff
101 sleep 2
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
102
done
Open commit View diff
102 done
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
103
log_f "Resolver OK"
Open commit View diff
103 log_f "Resolver OK"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
104
Open commit View diff
104
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
105
ACME_SH_BIN_PATH=${ACME_SH_BIN:-/opt/acme.sh/acme.sh}
Open commit View diff
105 ACME_SH_BIN_PATH=${ACME_SH_BIN:-/opt/acme.sh/acme.sh}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
106
ACME_SH_WORK_HOME=${ACME_SH_CONFIG_HOME:-/var/lib/acme/acme-sh}
Open commit View diff
106 ACME_SH_WORK_HOME=${ACME_SH_CONFIG_HOME:-/var/lib/acme/acme-sh}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
107
mkdir -p ${ACME_SH_WORK_HOME}
Open commit View diff
107 mkdir -p ${ACME_SH_WORK_HOME}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
108
Open commit View diff
108
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
109
if [[ ! -x ${ACME_SH_BIN_PATH} ]]; then
Open commit View diff
109 if [[ ! -x ${ACME_SH_BIN_PATH} ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
110
  log_f "acme.sh binary not found at ${ACME_SH_BIN_PATH}"
Open commit View diff
110 log_f "acme.sh binary not found at ${ACME_SH_BIN_PATH}"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
111
  exit 7
Open commit View diff
111 exit 7
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
112
fi
Open commit View diff
112 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
113
Open commit View diff
113
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
114
if [[ ! -f ${ACME_SH_WORK_HOME}/account.conf ]]; then
Open commit View diff
114 if [[ ! -f ${ACME_SH_WORK_HOME}/account.conf ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
115
  if [[ -z "${ACME_ACCOUNT_EMAIL}" ]]; then
Open commit View diff
115 if [[ -z "${ACME_ACCOUNT_EMAIL}" ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
116
    log_f "ACME_ACCOUNT_EMAIL is required to register a new acme.sh account"
Open commit View diff
116 log_f "ACME_ACCOUNT_EMAIL is required to register a new acme.sh account"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
117
    exit 8
Open commit View diff
117 exit 8
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
118
  fi
Open commit View diff
118 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
119
  log_f "Registering acme.sh account for ${ACME_ACCOUNT_EMAIL}"
Open commit View diff
119 log_f "Registering acme.sh account for ${ACME_ACCOUNT_EMAIL}"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
120
  REGISTER_CMD=("${ACME_SH_BIN_PATH}" "--home" "${ACME_SH_WORK_HOME}" "--config-home" "${ACME_SH_WORK_HOME}" "--cert-home" "${ACME_SH_WORK_HOME}" "--register-account" "-m" "${ACME_ACCOUNT_EMAIL}")
Open commit View diff
120 REGISTER_CMD=("${ACME_SH_BIN_PATH}" "--home" "${ACME_SH_WORK_HOME}" "--config-home" "${ACME_SH_WORK_HOME}" "--cert-home" "${ACME_SH_WORK_HOME}" "--register-account" "-m" "${ACME_ACCOUNT_EMAIL}")
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
121
  REGISTER_CMD+=("${ACME_SH_SERVER_ARGS[@]}")
Open commit View diff
121 REGISTER_CMD+=("${ACME_SH_SERVER_ARGS[@]}")
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
122
  REGISTER_RESPONSE=$("${REGISTER_CMD[@]}" 2>&1)
Open commit View diff
122 REGISTER_RESPONSE=$("${REGISTER_CMD[@]}" 2>&1)
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
123
  if [[ $? -ne 0 ]]; then
Open commit View diff
123 if [[ $? -ne 0 ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
124
    log_f "Failed to register acme.sh account: ${REGISTER_RESPONSE}"
Open commit View diff
124 log_f "Failed to register acme.sh account: ${REGISTER_RESPONSE}"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
125
    exit 9
Open commit View diff
125 exit 9
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
126
  fi
Open commit View diff
126 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
127
fi
Open commit View diff
127 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
128
Open commit View diff
128
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
129
TMP_CERT=$(mktemp /tmp/acme-cert.XXXXXX)
Open commit View diff
129 TMP_CERT=$(mktemp /tmp/acme-cert.XXXXXX)
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
130
TMP_FULLCHAIN=$(mktemp /tmp/acme-fullchain.XXXXXX)
Open commit View diff
130 TMP_FULLCHAIN=$(mktemp /tmp/acme-fullchain.XXXXXX)
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
131
Open commit View diff
131
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
132
ACME_CMD=("${ACME_SH_BIN_PATH}" "--home" "${ACME_SH_WORK_HOME}" "--config-home" "${ACME_SH_WORK_HOME}" "--cert-home" "${ACME_SH_WORK_HOME}")
Open commit View diff
132 ACME_CMD=("${ACME_SH_BIN_PATH}" "--home" "${ACME_SH_WORK_HOME}" "--config-home" "${ACME_SH_WORK_HOME}" "--cert-home" "${ACME_SH_WORK_HOME}")
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
133
ACME_CMD+=("${ACME_SH_SERVER_ARGS[@]}")
Open commit View diff
133 ACME_CMD+=("${ACME_SH_SERVER_ARGS[@]}")
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
134
ACME_CMD+=("--issue" "--dns" "${ACME_DNS_PROVIDER}" "--key-file" "${KEY}" "--cert-file" "${TMP_CERT}" "--fullchain-file" "${TMP_FULLCHAIN}" "--force")
Open commit View diff
134 ACME_CMD+=("--issue" "--dns" "${ACME_DNS_PROVIDER}" "--key-file" "${KEY}" "--cert-file" "${TMP_CERT}" "--fullchain-file" "${TMP_FULLCHAIN}" "--force")
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
135
for domain in "${CERT_DOMAINS[@]}"; do
Open commit View diff
135 for domain in "${CERT_DOMAINS[@]}"; do
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
136
  ACME_CMD+=("-d" "${domain}")
Open commit View diff
136 ACME_CMD+=("-d" "${domain}")
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
137
done
Open commit View diff
137 done
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
138
Open commit View diff
138
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
139
log_f "Using command ${ACME_CMD[*]}"
Open commit View diff
139 log_f "Using command ${ACME_CMD[*]}"
Carlos 8 months ago 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
140
if [[ -n "${ACME_DNS_PROVIDER}" ]]; then
Open commit View diff
140 if [[ -n "${ACME_DNS_PROVIDER}" ]]; then
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
141
  log_f "DNS provider: ${ACME_DNS_PROVIDER}"
Open commit View diff
141 log_f "DNS provider: ${ACME_DNS_PROVIDER}"
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
142
fi
Open commit View diff
142 fi
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
143
if compgen -A variable | grep -Eq "^DNS_|^ACME_"; then
Open commit View diff
143 if compgen -A variable | grep -Eq "^DNS_|^ACME_"; then
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
144
  LOG_KEYS=$(env | grep -E "^(DNS_|ACME_)" | cut -d= -f1 | tr '\n' ' ')
Open commit View diff
144 LOG_KEYS=$(env | grep -E "^(DNS_|ACME_)" | cut -d= -f1 | tr '\n' ' ')
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
145
  log_f "Available DNS/ACME env keys: ${LOG_KEYS}" redis_only
Open commit View diff
145 log_f "Available DNS/ACME env keys: ${LOG_KEYS}" redis_only
same change 890295b

Add DNS-01 challenge support with configuration files and scripts

Full commit hash
890295bbfc0a1c29ebf171e1f15581f0ad1f6ade
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
146
fi
Open commit View diff
146 fi
Carlos 8 months ago a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
147
ACME_RESPONSE=$("${ACME_CMD[@]}" 2>&1 | tee /dev/fd/5; exit ${PIPESTATUS[0]})
Open commit View diff
147 ACME_RESPONSE=$("${ACME_CMD[@]}" 2>&1 | tee /dev/fd/5; exit ${PIPESTATUS[0]})
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
148
SUCCESS="$?"
Open commit View diff
148 SUCCESS="$?"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
149
ACME_RESPONSE_B64=$(echo "${ACME_RESPONSE}" | openssl enc -e -A -base64)
Open commit View diff
149 ACME_RESPONSE_B64=$(echo "${ACME_RESPONSE}" | openssl enc -e -A -base64)
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
150
log_f "${ACME_RESPONSE_B64}" redis_only b64
Open commit View diff
150 log_f "${ACME_RESPONSE_B64}" redis_only b64
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
151
Open commit View diff
151
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
152
case "$SUCCESS" in
Open commit View diff
152 case "$SUCCESS" in
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
153
  0)
Open commit View diff
153 0)
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
154
    log_f "Deploying certificate ${CERT}..."
Open commit View diff
154 log_f "Deploying certificate ${CERT}..."
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
155
    if verify_hash_match ${TMP_FULLCHAIN} ${KEY}; then
Open commit View diff
155 if verify_hash_match ${TMP_FULLCHAIN} ${KEY}; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
156
      RETURN=0
Open commit View diff
156 RETURN=0
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
157
      if [[ -f ${CERT} ]]; then
Open commit View diff
157 if [[ -f ${CERT} ]]; then
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
158
        RETURN=1
Open commit View diff
158 RETURN=1
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
159
      fi
Open commit View diff
159 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
160
      mv -f ${TMP_FULLCHAIN} ${CERT}
Open commit View diff
160 mv -f ${TMP_FULLCHAIN} ${CERT}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
161
      rm -f ${TMP_CERT}
Open commit View diff
161 rm -f ${TMP_CERT}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
162
      echo -n ${CERT_DOMAINS[*]} > ${DOMAINS_FILE}
Open commit View diff
162 echo -n ${CERT_DOMAINS[*]} > ${DOMAINS_FILE}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
163
      log_f "Certificate successfully obtained via DNS challenge"
Open commit View diff
163 log_f "Certificate successfully obtained via DNS challenge"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
164
      exit ${RETURN}
Open commit View diff
164 exit ${RETURN}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
165
    else
Open commit View diff
165 else
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
166
      log_f "Certificate was requested, but key and certificate hashes do not match"
Open commit View diff
166 log_f "Certificate was requested, but key and certificate hashes do not match"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
167
      rm -f ${TMP_CERT} ${TMP_FULLCHAIN}
Open commit View diff
167 rm -f ${TMP_CERT} ${TMP_FULLCHAIN}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
168
      exit 4
Open commit View diff
168 exit 4
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
169
    fi
Open commit View diff
169 fi
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
170
    ;;
Open commit View diff
170 ;;
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
171
  *)
Open commit View diff
171 *)
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
172
    log_f "Failed to obtain certificate ${CERT} for domains '${CERT_DOMAINS[*]}' via DNS challenge"
Open commit View diff
172 log_f "Failed to obtain certificate ${CERT} for domains '${CERT_DOMAINS[*]}' via DNS challenge"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
173
    redis-cli -h redis -a ${REDISPASS} --no-auth-warning SET ACME_FAIL_TIME "$(date +%s)"
Open commit View diff
173 redis-cli -h redis -a ${REDISPASS} --no-auth-warning SET ACME_FAIL_TIME "$(date +%s)"
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
174
    rm -f ${TMP_CERT} ${TMP_FULLCHAIN}
Open commit View diff
174 rm -f ${TMP_CERT} ${TMP_FULLCHAIN}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
175
    exit 100${SUCCESS}
Open commit View diff
175 exit 100${SUCCESS}
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
176
    ;;
Open commit View diff
176 ;;
same change a52e977

Add DNS-01 challenge support for ACME certificates and related configurations

Full commit hash
a52e977b89d02044f901a32c1b30568d3e08bb2a
Author
Carlos <[email protected]>
Date
8 months ago
Selected line
177
esac
Open commit View diff
177 esac