ai-chatbot/scripts/security/install-security-stack.sh
Your Name 73d0d9d8c2
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
feat(security): integrate one-click server hardening into deploy flow
2026-02-12 15:09:16 +08:00

22 lines
571 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
if [ "${EUID:-$(id -u)}" -ne 0 ]; then
echo "[security-stack] must run as root"
exit 1
fi
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "[security-stack] installing security stack..."
if [ -f "$SCRIPT_DIR/install-perf-guard.sh" ]; then
bash "$SCRIPT_DIR/install-perf-guard.sh" || echo "[security-stack] perf-guard install failed"
fi
if [ -f "$SCRIPT_DIR/harden-server.sh" ]; then
bash "$SCRIPT_DIR/harden-server.sh" || echo "[security-stack] harden-server failed"
fi
echo "[security-stack] completed"