infra-controller/scripts/infra-deregister
Jeremie Fraeys 0291800ef5
Some checks failed
Deploy / deploy (push) Failing after 7s
Option B: stop unused services; add restricted SSH scripts
2026-01-20 12:18:09 -05:00

16 lines
372 B
Bash

#!/usr/bin/env bash
set -euo pipefail
APP_NAME="${1:-}"
if [[ -z "$APP_NAME" ]]; then
echo "usage: infra-deregister <app_name>" >&2
exit 2
fi
if ! [[ "$APP_NAME" =~ ^[A-Za-z0-9._-]+$ ]]; then
echo "invalid app name: $APP_NAME" >&2
exit 2
fi
rm -f "/var/run/active-apps/$APP_NAME.toml" "/var/run/active-apps/$APP_NAME.yml" "/var/run/active-apps/$APP_NAME.yaml"