Fix crash running /app/force_renew
Some checks failed
Build and publish Docker image / Build and publish Docker image (push) Has been cancelled
Some checks failed
Build and publish Docker image / Build and publish Docker image (push) Has been cancelled
This commit is contained in:
parent
3badf7e255
commit
28590c301b
@ -6,21 +6,7 @@ set -u
|
||||
# shellcheck source=functions.sh
|
||||
source /app/functions.sh
|
||||
|
||||
if [[ "$ACME_CA_URI" == "https://acme-v01.api.letsencrypt.org/directory" ]] || \
|
||||
[[ "$ACME_CA_URI" == "production" ]] || \
|
||||
[[ "$ACME_CA_URI" == "prod" ]]; then
|
||||
original_acme="$ACME_CA_URI"
|
||||
export ACME_CA_URI="https://acme-v02.api.letsencrypt.org/directory"
|
||||
echo "Info: Rewriting ACME_CA_URI from $original_acme to $ACME_CA_URI"
|
||||
fi
|
||||
|
||||
if [[ "$ACME_CA_URI" == "https://acme-staging.api.letsencrypt.org/directory" ]] || \
|
||||
[[ "$ACME_CA_URI" == "staging" ]] || \
|
||||
[[ "$ACME_CA_URI" == "test" ]]; then
|
||||
original_acme="$ACME_CA_URI"
|
||||
export ACME_CA_URI="https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
echo "Info: Rewriting ACME_CA_URI from $original_acme to $ACME_CA_URI"
|
||||
fi
|
||||
load_acme_ca_uri
|
||||
|
||||
function print_version {
|
||||
if [[ -n "${COMPANION_VERSION:-}" ]]; then
|
||||
|
||||
@ -429,3 +429,21 @@ function set_ownership_and_permissions {
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function load_acme_ca_uri {
|
||||
if [[ "$ACME_CA_URI" == "https://acme-v01.api.letsencrypt.org/directory" ]] || \
|
||||
[[ "$ACME_CA_URI" == "production" ]] || \
|
||||
[[ "$ACME_CA_URI" == "prod" ]]; then
|
||||
original_acme="$ACME_CA_URI"
|
||||
export ACME_CA_URI="https://acme-v02.api.letsencrypt.org/directory"
|
||||
echo "Info: Rewriting ACME_CA_URI from $original_acme to $ACME_CA_URI"
|
||||
fi
|
||||
|
||||
if [[ "$ACME_CA_URI" == "https://acme-staging.api.letsencrypt.org/directory" ]] || \
|
||||
[[ "$ACME_CA_URI" == "staging" ]] || \
|
||||
[[ "$ACME_CA_URI" == "test" ]]; then
|
||||
original_acme="$ACME_CA_URI"
|
||||
export ACME_CA_URI="https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
echo "Info: Rewriting ACME_CA_URI from $original_acme to $ACME_CA_URI"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
# shellcheck source=functions.sh
|
||||
source /app/functions.sh
|
||||
|
||||
load_acme_ca_uri
|
||||
|
||||
CERTS_UPDATE_INTERVAL="${CERTS_UPDATE_INTERVAL:-3600}"
|
||||
ACME_CA_URI="${ACME_CA_URI:-"https://acme-v02.api.letsencrypt.org/directory"}"
|
||||
ACME_CA_TEST_URI="https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user