#!/usr/bin/env bash
# Shinobi Defense WAF — bootstrap installer
# Pin the apt repo and install the meta-package.
set -euo pipefail
APT_KEYRING=/usr/share/keyrings/shinobi-archive-keyring.gpg
APT_SOURCE=/etc/apt/sources.list.d/shinobi.list

curl -fsSL https://repo.anminhsecurity.com/key.asc \
  | sudo gpg --dearmor --yes -o "$APT_KEYRING"

echo "deb [signed-by=$APT_KEYRING arch=amd64,all] https://repo.anminhsecurity.com/debian stable main" \
  | sudo tee "$APT_SOURCE" >/dev/null

sudo apt-get update
sudo apt-get install -y shinobi-stack
echo "Shinobi Defense WAF installed. Run: sudo systemctl status shinobi-waf"
