初次提交
Build VoiceHub FPK / build-fpk (push) Failing after 56m5s
Build and Push Docker Image / build-and-push (push) Canceled after 1h9m35s

This commit is contained in:
2026-09-06 08:19:02 +08:00
commit 4ce4649aaf
1061 changed files with 337258 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
FILE_PATH="${TRIM_APPDEST}/docker/docker-compose.yaml"
# 检查 Docker 容器是否正在运行
is_docker_running() {
local name
[ -f "$FILE_PATH" ] || return 1
name=$(grep '^[[:space:]]*container_name:' "$FILE_PATH" | head -1 | cut -d ':' -f 2- | xargs)
[ -n "$name" ] || return 1
[ "$(docker inspect -f '{{.State.Running}}' "$name" 2>/dev/null)" = "true" ]
}
case $1 in
start) exit 0 ;;
stop) exit 0 ;;
status) is_docker_running && exit 0 || exit 3 ;;
*) exit 1 ;;
esac