mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-25 02:21:02 +01:00
check if privkey exists and is readable instead of checking if it's a regular file (fixes #122)
This commit is contained in:
@@ -465,7 +465,7 @@ sign_domain() {
|
||||
|
||||
privkey="privkey.pem"
|
||||
# generate a new private key if we need or want one
|
||||
if [[ ! -f "${BASEDIR}/certs/${domain}/privkey.pem" ]] || [[ "${PRIVATE_KEY_RENEW}" = "yes" ]]; then
|
||||
if [[ ! -r "${BASEDIR}/certs/${domain}/privkey.pem" ]] || [[ "${PRIVATE_KEY_RENEW}" = "yes" ]]; then
|
||||
echo " + Generating private key..."
|
||||
privkey="privkey-${timestamp}.pem"
|
||||
case "${KEY_ALGO}" in
|
||||
|
||||
Reference in New Issue
Block a user