This commit is contained in:
j
2026-03-07 19:32:02 +13:00
commit bd907c8d40
21 changed files with 1303 additions and 0 deletions

23
status.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
source "${AGENT_PATH}/common.sh"
_check_required_env_vars "CONTAINER_NAME"
APP_CONTAINER="${CONTAINER_NAME}-app-1"
if ! docker ps -a --format "{{.Names}}" | grep -q "^${APP_CONTAINER}$"; then
echo "Unknown"
exit 0
fi
STATE=$(docker inspect -f '{{.State.Status}}' "$APP_CONTAINER" 2>/dev/null)
case "$STATE" in
running)
echo "Running"
;;
exited|stopped)
echo "Stopped"
;;
*)
echo "Unknown"
;;
esac