sign_domain() {
local certdir="${1}"
shift
+ timestamp="${1}"
+ shift
domain="${1}"
altnames="${*}"
- timestamp="$(date +%s)"
export altnames
force_renew="${PARAM_FORCE:-no}"
+ timestamp="$(date +%s)"
+
if [[ -z "${morenames}" ]];then
echo "Processing ${domain}"
else
fi
fi
+ # Check expire date of existing certificate
if [[ -e "${cert}" ]]; then
echo " + Checking expire date of existing cert..."
valid="$("${OPENSSL}" x509 -enddate -noout -in "${cert}" | cut -d= -f2- )"
local update_ocsp
update_ocsp="no"
- # shellcheck disable=SC2086
+ # Sign certificate for this domain
if [[ ! "${skip}" = "yes" ]]; then
update_ocsp="yes"
if [[ "${PARAM_KEEP_GOING:-}" = "yes" ]]; then
- sign_domain "${certdir}" ${domain} ${morenames} &
+ sign_domain "${certdir}" ${timestamp} ${domain} ${morenames} &
wait $! || true
else
- sign_domain "${certdir}" ${domain} ${morenames}
+ sign_domain "${certdir}" ${timestamp} ${domain} ${morenames}
fi
fi