22 lines
571 B
Bash
Executable File
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"
|