Files
NetAlertX/install/production-filesystem/services/check-first-run-config.sh
2025-10-17 16:36:48 -04:00

22 lines
1.0 KiB
Bash

#!/bin/sh
# first-run-check.sh - Checks and initializes configuration files on first run
# Check for app.conf and deploy if required
if [ ! -f /app/config/app.conf ]; then
mkdir -p /app/config
cp /app/back/app.conf /app/config/app.conf
CYAN='\033[1;36m'
RESET='\033[0m'
>&2 printf "%s" "${CYAN}"
>&2 cat <<'EOF'
══════════════════════════════════════════════════════════════════════════════
🆕 First run detected. Default configuration written to /app/config/app.conf.
Review your settings in the UI or edit the file directly before trusting
this instance in production.
══════════════════════════════════════════════════════════════════════════════
EOF
>&2 printf "%s" "${RESET}"
fi