[ACME] Fix exit command (was using echo), fix for duplicate SAN (filter)
parent
7fe6fba994
commit
de14d30e6b
|
@ -137,10 +137,11 @@ while true; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
ALL_VALIDATED="$(echo ${VALIDATED_CONFIG_DOMAINS[*]} ${ADDITIONAL_VALIDATED_SAN[*]} ${VALIDATED_MAILCOW_HOSTNAME})"
|
# Unique elements
|
||||||
|
ALL_VALIDATED=($(echo ${VALIDATED_CONFIG_DOMAINS[*]} ${ADDITIONAL_VALIDATED_SAN[*]} ${VALIDATED_MAILCOW_HOSTNAME} | xargs -n1 | sort -u | xargs))
|
||||||
if [[ -z ${ALL_VALIDATED[*]} ]]; then
|
if [[ -z ${ALL_VALIDATED[*]} ]]; then
|
||||||
echo "Cannot validate hostnames, skipping Let's Encrypt..."
|
echo "Cannot validate hostnames, skipping Let's Encrypt..."
|
||||||
echo 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ORPHANED_SAN=($(echo ${SAN_ARRAY_NOW[*]} ${VALIDATED_CONFIG_DOMAINS[*]} ${ADDITIONAL_VALIDATED_SAN[*]} ${MAILCOW_HOSTNAME} | tr ' ' '\n' | sort | uniq -u ))
|
ORPHANED_SAN=($(echo ${SAN_ARRAY_NOW[*]} ${VALIDATED_CONFIG_DOMAINS[*]} ${ADDITIONAL_VALIDATED_SAN[*]} ${MAILCOW_HOSTNAME} | tr ' ' '\n' | sort | uniq -u ))
|
||||||
|
@ -159,7 +160,7 @@ while true; do
|
||||||
-f ${ACME_BASE}/acme/private/account.key \
|
-f ${ACME_BASE}/acme/private/account.key \
|
||||||
-k ${ACME_BASE}/acme/private/privkey.pem \
|
-k ${ACME_BASE}/acme/private/privkey.pem \
|
||||||
-c ${ACME_BASE}/acme \
|
-c ${ACME_BASE}/acme \
|
||||||
${VALIDATED_MAILCOW_HOSTNAME} ${VALIDATED_CONFIG_DOMAINS[*]} ${ADDITIONAL_VALIDATED_SAN[*]}
|
${ALL_VALIDATED[*]}
|
||||||
|
|
||||||
case "$?" in
|
case "$?" in
|
||||||
0) # new certs
|
0) # new certs
|
||||||
|
|
Loading…
Reference in New Issue