#!/usr/bin/env bash # 25-angie — Angie (nginx fork) web server. step_name="angie" step_desc="angie web server (nginx fork), enable + open 80/443" step_run="run_angie" run_angie() { log "installing angie" if command -v angie >/dev/null 2>&1; then ok "angie already installed" else case "$DISTRO" in arch) _angie_arch ;; debian) _angie_debian ;; esac fi if command -v systemctl >/dev/null 2>&1 && systemctl is-system-running >/dev/null 2>&1; then sudo_ systemctl enable --now angie 2>/dev/null || warn "could not enable angie.service" else warn "systemctl unavailable — start angie manually if needed" fi # firewall note: ufw rules for 80/443 are owned by the hardening step ok "angie installed. ufw 80/443 handled in the hardening step." } _angie_arch() { if command -v yay >/dev/null 2>&1; then as_user yay -S --noconfirm angie 2>/dev/null \ || as_user yay -S --noconfirm aur/angie 2>/dev/null \ || warn "angie AUR build failed — try: yay -S angie" else warn "yay not available — install angie manually from AUR: yay -S angie" fi } _angie_debian() { . /etc/os-release sudo_ install -m 0755 -d /etc/apt/keyrings curl -fsSL https://angie.software/keys/angie-signing.gpg \ | sudo_ tee /etc/apt/keyrings/angie-signing.gpg >/dev/null echo "deb [signed-by=/etc/apt/keyrings/angie-signing.gpg] https://download.angie.software/angie/${ID}/ ${VERSION_CODENAME} main" \ | sudo_ tee /etc/apt/sources.list.d/angie.list >/dev/null sudo_ apt-get update -y sudo_ apt-get install -y angie }