v2.3
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "=========================================="
|
||||
echo " Audit Hardening Tool - Docker Container"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
# Check required files
|
||||
echo "Checking required files..."
|
||||
|
||||
if [ ! -f "/app/users_config.json" ]; then
|
||||
echo "⚠️ WARNING: users_config.json not found! Using default admin user."
|
||||
fi
|
||||
|
||||
if [ ! -f "/app/radius_config.json" ]; then
|
||||
echo "⚠️ WARNING: radius_config.json not found! RADIUS authentication will be disabled."
|
||||
fi
|
||||
|
||||
if [ ! -f "/app/email_config.json" ]; then
|
||||
echo "ℹ️ INFO: email_config.json not found. Email notifications will be disabled."
|
||||
fi
|
||||
|
||||
if [ ! -d "/app/config" ]; then
|
||||
echo "❌ ERROR: config directory not found! Mount it with: -v ./config:/app/config:ro"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "/app/keys" ]; then
|
||||
echo "❌ ERROR: keys directory not found! Mount it with: -v ./keys:/app/keys:ro"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "/app/templates" ]; then
|
||||
echo "❌ ERROR: templates directory not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✓ All required files/directories found"
|
||||
echo ""
|
||||
|
||||
# Create output directories if not exist
|
||||
echo "Creating data directories..."
|
||||
mkdir -p /app/uploads /app/output
|
||||
|
||||
# Set permissions
|
||||
chmod 755 /app/uploads /app/output
|
||||
|
||||
echo "✓ Data directories ready"
|
||||
echo ""
|
||||
|
||||
echo "Starting application..."
|
||||
echo "Listening on: http://0.0.0.0:8000"
|
||||
echo "Root path: /audit"
|
||||
echo ""
|
||||
|
||||
# Execute the main command
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user