diff --git a/target/scripts/helpers/error.sh b/target/scripts/helpers/error.sh index 99135e1d..d4462b9f 100644 --- a/target/scripts/helpers/error.sh +++ b/target/scripts/helpers/error.sh @@ -35,7 +35,7 @@ function dms_panic() { ;; ( 'no-file' ) # PANIC_INFO == - SHUTDOWN_MESSAGE="File ${PANIC_INFO} does not exist!" + SHUTDOWN_MESSAGE="Missing expected file(s): ${PANIC_INFO}" ;; ( 'misconfigured' ) # PANIC_INFO == diff --git a/target/scripts/helpers/ssl.sh b/target/scripts/helpers/ssl.sh index e3d4e7db..c7d70317 100644 --- a/target/scripts/helpers/ssl.sh +++ b/target/scripts/helpers/ssl.sh @@ -309,7 +309,15 @@ function _setup_ssl() { _log 'trace' "SSL configured with 'self-signed' certificates" else - _dms_panic__no_file "${SS_KEY} or ${SS_CERT} or ${SS_CA_CERT}" "${SCOPE_SSL_TYPE}" + local MISSING_FILES=() + [[ ! -f ${SS_KEY} ]] && MISSING_FILES+=("${SS_KEY}") + [[ ! -f ${SS_CERT} ]] && MISSING_FILES+=("${SS_CERT}") + [[ ! -f ${SS_CA_CERT} ]] && MISSING_FILES+=("${SS_CA_CERT}") + + # Concatenate each element and delimit with ` + `: + local ERROR_CONTEXT + ERROR_CONTEXT=$(printf "'%s' + " "${MISSING_FILES[@]}" | sed 's/ + $//') + _dms_panic__no_file "${ERROR_CONTEXT}" "${SCOPE_SSL_TYPE}" fi ;;