diff --git a/evoacme/files/evoacme.sh b/evoacme/files/evoacme.sh index 323d7647..0a36262a 100755 --- a/evoacme/files/evoacme.sh +++ b/evoacme/files/evoacme.sh @@ -83,6 +83,14 @@ main() { SELF_SIGNED_DIR=${SELF_SIGNED_DIR:-"/etc/ssl/self-signed"} SSL_EMAIL=${SSL_EMAIL:-""} + [ -w "${SSL_KEY_DIR}" ] || error "Directory ${SSL_KEY_DIR} is not writable" + [ -w "${ACME_DIR}" ] || error "Directory ${ACME_DIR} is not writable" + [ -w "${CSR_DIR}" ] || error "Directory ${CSR_DIR} is not writable" + [ -w "${CRT_DIR}" ] || error "Directory ${CRT_DIR} is not writable" + [ -w "${LOG_DIR}" ] || error "Directory ${LOG_DIR} is not writable" + [ -w "${SELF_SIGNED_DIR}" ] || error "Directory ${SELF_SIGNED_DIR} is not writable" + [ -r "${SSL_CONFIG_FILE}" ] || error "File ${SSL_CONFIG_FILE} is not readable" + CRON=${CRON:-"0"} TEST=${TEST:-"0"} DRY_RUN=${DRY_RUN:-"0"} diff --git a/evoacme/files/make-csr.sh b/evoacme/files/make-csr.sh index 1e39bef9..33aa77b0 100755 --- a/evoacme/files/make-csr.sh +++ b/evoacme/files/make-csr.sh @@ -81,7 +81,7 @@ make_csr() { nb=$(echo "${domains}" | wc -l) config_file="/tmp/make-csr-${VHOST}.conf" - mkdir -p -m 0755 "${CSR_DIR}" + mkdir -p -m 0755 "${CSR_DIR}" || error "Unable to mkdir ${CSR_DIR}" if [ "${nb}" -eq 1 ]; then cat ${SSL_CONFIG_FILE} - > "${config_file}" <