diff --git a/immich/_compose.sh b/immich/_compose.sh index 0995ec9..79efc0d 100644 --- a/immich/_compose.sh +++ b/immich/_compose.sh @@ -1,12 +1,16 @@ #!/bin/bash # Helper to detect and use the correct docker compose command -# Detect which compose command is available -if docker compose version &>/dev/null; then - docker_compose() { docker compose "$@"; } -elif command -v docker-compose &>/dev/null; then - docker_compose() { docker-compose "$@"; } +# Detect which compose command is available (check standalone first for Unraid compatibility) +if command -v docker-compose &>/dev/null; then + COMPOSE_CMD="docker-compose" +elif docker compose version &>/dev/null; then + COMPOSE_CMD="docker compose" else echo "Error: Neither 'docker compose' nor 'docker-compose' found" exit 1 fi + +docker_compose() { + $COMPOSE_CMD "$@" +} diff --git a/immich/status.sh b/immich/status.sh index 2624306..b5626a7 100755 --- a/immich/status.sh +++ b/immich/status.sh @@ -5,9 +5,8 @@ source "${AGENT_PATH}/common.sh" _check_required_env_vars "CONTAINER_NAME" # Check if main server container is running -if ! _is_container_running "${CONTAINER_NAME}_server"; then - _die "Service is not running - container ${CONTAINER_NAME}_server not found or stopped." +if _is_container_running "${CONTAINER_NAME}_server"; then + echo "Running" +else + echo "Stopped" fi - -echo "Service is healthy" -exit 0