mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-11 07:32:52 +02:00
check if privkey exists and is readable instead of checking if it's a regular file (fixes #122)
This commit is contained in:
+1
-1
@@ -465,7 +465,7 @@ sign_domain() {
|
|||||||
|
|
||||||
privkey="privkey.pem"
|
privkey="privkey.pem"
|
||||||
# generate a new private key if we need or want one
|
# 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..."
|
echo " + Generating private key..."
|
||||||
privkey="privkey-${timestamp}.pem"
|
privkey="privkey-${timestamp}.pem"
|
||||||
case "${KEY_ALGO}" in
|
case "${KEY_ALGO}" in
|
||||||
|
|||||||
Reference in New Issue
Block a user