aureon-os / scripts /linux /aureon-down.sh
GaryLeckey's picture
Deploy Aureon OS (deploy/selfhost stack: nginx edge + fusion API x2 + console + HNC organ + redis + postgres; paper mode) (part 19)
da0ce7b verified
Raw History Blame Contribute Delete
985 Bytes
#!/usr/bin/env bash
# Aureon — stop the whole system (Linux).
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT"
export PATH="$ROOT/.venv/bin:$PATH"
export AUREON_ROOT="$ROOT"
export AUREON_PYTHON="$ROOT/.venv/bin/python"
export AUREON_START_SWARM=false
export AUREON_START_FRONTEND=false
if [ -S state/supervisor.sock ]; then
if .venv/bin/supervisorctl -c deploy/supervisord.linux.conf shutdown; then
echo "Legacy Aureon supervisor shutdown acknowledged over its checkout socket."
else
echo "Legacy supervisor did not acknowledge shutdown; no PID signal was sent." >&2
exit 1
fi
elif [ -f state/supervisord.pid ]; then
echo "Unverified legacy PID file present; refusing to signal a potentially recycled PID." >&2
echo "Verify process identity and ownership outside this script before manual shutdown." >&2
exit 1
else
echo "Aureon does not appear to be running (no supervisor socket/pid)."
fi