From 0897c05200e4ab2d58b6c37e8560bc3d08ede18a Mon Sep 17 00:00:00 2001 From: Adam Outler Date: Thu, 23 Oct 2025 21:16:15 -0400 Subject: [PATCH] Tidy up output --- install/production-filesystem/entrypoint.sh | 3 ++- .../scripts/{check-cap.sh => check-capabilities.sh} | 0 .../services/scripts/check-mandatory-folders.sh | 10 +++++----- .../{check-storage.sh => check-persistent_storage.sh} | 0 .../services/scripts/check-ramdisk.sh | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) rename install/production-filesystem/services/scripts/{check-cap.sh => check-capabilities.sh} (100%) rename install/production-filesystem/services/scripts/{check-storage.sh => check-persistent_storage.sh} (100%) diff --git a/install/production-filesystem/entrypoint.sh b/install/production-filesystem/entrypoint.sh index b8ef0f9f..00e14ff1 100644 --- a/install/production-filesystem/entrypoint.sh +++ b/install/production-filesystem/entrypoint.sh @@ -49,6 +49,7 @@ printf ' \033[0m Network intruder and presence detector. https://netalertx.com + ' set -u @@ -57,7 +58,7 @@ NETALERTX_DOCKER_ERROR_CHECK=0 # Run all pre-startup checks to validate container environment and dependencies -if [ ${NETALERTX_DEBUG != 1} ]; then +if [ "${NETALERTX_DEBUG:-0}" != "1" ]; then echo "Startup pre-checks" for script in ${SYSTEM_SERVICES_SCRIPTS}/check-*.sh; do script_name=$(basename "$script" | sed 's/^check-//;s/\.sh$//;s/-/ /g') diff --git a/install/production-filesystem/services/scripts/check-cap.sh b/install/production-filesystem/services/scripts/check-capabilities.sh similarity index 100% rename from install/production-filesystem/services/scripts/check-cap.sh rename to install/production-filesystem/services/scripts/check-capabilities.sh diff --git a/install/production-filesystem/services/scripts/check-mandatory-folders.sh b/install/production-filesystem/services/scripts/check-mandatory-folders.sh index f7d391c5..bc971bbb 100644 --- a/install/production-filesystem/services/scripts/check-mandatory-folders.sh +++ b/install/production-filesystem/services/scripts/check-mandatory-folders.sh @@ -5,7 +5,7 @@ check_mandatory_folders() { # Check and create plugins log directory if [ ! -d "${NETALERTX_PLUGINS_LOG}" ]; then - echo "Warning: Plugins log directory missing, creating..." + echo " * Creating Plugins log." if ! mkdir -p "${NETALERTX_PLUGINS_LOG}"; then echo "Error: Failed to create plugins log directory: ${NETALERTX_PLUGINS_LOG}" return 1 @@ -14,7 +14,7 @@ check_mandatory_folders() { # Check and create system services run log directory if [ ! -d "${SYSTEM_SERVICES_RUN_LOG}" ]; then - echo "Warning: System services run log directory missing, creating..." + echo " * Creating System services run log." if ! mkdir -p "${SYSTEM_SERVICES_RUN_LOG}"; then echo "Error: Failed to create system services run log directory: ${SYSTEM_SERVICES_RUN_LOG}" return 1 @@ -23,7 +23,7 @@ check_mandatory_folders() { # Check and create system services run tmp directory if [ ! -d "${SYSTEM_SERVICES_RUN_TMP}" ]; then - echo "Warning: System services run tmp directory missing, creating..." + echo " * Creating System services run tmp." if ! mkdir -p "${SYSTEM_SERVICES_RUN_TMP}"; then echo "Error: Failed to create system services run tmp directory: ${SYSTEM_SERVICES_RUN_TMP}" return 1 @@ -32,7 +32,7 @@ check_mandatory_folders() { # Check and create DB locked log file if [ ! -f "${LOG_DB_IS_LOCKED}" ]; then - echo "Warning: DB locked log file missing, creating..." + echo " * Creating DB locked log." if ! touch "${LOG_DB_IS_LOCKED}"; then echo "Error: Failed to create DB locked log file: ${LOG_DB_IS_LOCKED}" return 1 @@ -41,7 +41,7 @@ check_mandatory_folders() { # Check and create execution queue log file if [ ! -f "${LOG_EXECUTION_QUEUE}" ]; then - echo "Warning: Execution queue log file missing, creating..." + echo " * Creating Execution queue log." if ! touch "${LOG_EXECUTION_QUEUE}"; then echo "Error: Failed to create execution queue log file: ${LOG_EXECUTION_QUEUE}" return 1 diff --git a/install/production-filesystem/services/scripts/check-storage.sh b/install/production-filesystem/services/scripts/check-persistent_storage.sh similarity index 100% rename from install/production-filesystem/services/scripts/check-storage.sh rename to install/production-filesystem/services/scripts/check-persistent_storage.sh diff --git a/install/production-filesystem/services/scripts/check-ramdisk.sh b/install/production-filesystem/services/scripts/check-ramdisk.sh index 22fe26ba..64cdbe57 100644 --- a/install/production-filesystem/services/scripts/check-ramdisk.sh +++ b/install/production-filesystem/services/scripts/check-ramdisk.sh @@ -45,6 +45,6 @@ if [ "${failures}" -ne 0 ]; then exit 0 fi -if [ ! -f "${SYSTEM_NGINX_CONFIG}/conf.active" ]; then +if [ ! -d "${SYSTEM_NGINX_CONFIG}/conf.active" ]; then echo "Note: Using default listen address ${LISTEN_ADDR}:${PORT} (no ${SYSTEM_NGINX_CONFIG}/conf.active override)." fi