Update 2 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 7s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 7s
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Helper to detect and use the correct docker compose command
|
# Helper to detect and use the correct docker compose command
|
||||||
|
|
||||||
# Detect which compose command is available
|
# Detect which compose command is available (check standalone first for Unraid compatibility)
|
||||||
if docker compose version &>/dev/null; then
|
if command -v docker-compose &>/dev/null; then
|
||||||
docker_compose() { docker compose "$@"; }
|
COMPOSE_CMD="docker-compose"
|
||||||
elif command -v docker-compose &>/dev/null; then
|
elif docker compose version &>/dev/null; then
|
||||||
docker_compose() { docker-compose "$@"; }
|
COMPOSE_CMD="docker compose"
|
||||||
else
|
else
|
||||||
echo "Error: Neither 'docker compose' nor 'docker-compose' found"
|
echo "Error: Neither 'docker compose' nor 'docker-compose' found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
docker_compose() {
|
||||||
|
$COMPOSE_CMD "$@"
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ source "${AGENT_PATH}/common.sh"
|
|||||||
_check_required_env_vars "CONTAINER_NAME"
|
_check_required_env_vars "CONTAINER_NAME"
|
||||||
|
|
||||||
# Check if main server container is running
|
# Check if main server container is running
|
||||||
if ! _is_container_running "${CONTAINER_NAME}_server"; then
|
if _is_container_running "${CONTAINER_NAME}_server"; then
|
||||||
_die "Service is not running - container ${CONTAINER_NAME}_server not found or stopped."
|
echo "Running"
|
||||||
|
else
|
||||||
|
echo "Stopped"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Service is healthy"
|
|
||||||
exit 0
|
|
||||||
|
|||||||
Reference in New Issue
Block a user