Handle more edge cases; more clear warnings

This commit is contained in:
Adam Outler
2026-01-06 00:43:48 +00:00
parent 16375abb51
commit c86d0c8772
15 changed files with 613 additions and 1482 deletions
@@ -2,6 +2,12 @@
# Ensures the database exists, or creates a new one on first run.
# Intended to run only at initial startup.
# Fix permissions if DB directory exists but is unreadable
if [ -d "${NETALERTX_DB}" ]; then
chmod u+rwX "${NETALERTX_DB}" 2>/dev/null || true
fi
chmod u+rw "${NETALERTX_DB_FILE}" 2>/dev/null || true
set -eu
CYAN=$(printf '\033[1;36m')