#!/bin/bash source "${AGENT_PATH}/common.sh" _check_required_env_vars "CONTAINER_NAME" # Check if both containers are running shlink_running=$(_is_container_running "$CONTAINER_NAME" && echo "yes" || echo "no") db_running=$(_is_container_running "${CONTAINER_NAME}_db" && echo "yes" || echo "no") if [ "$shlink_running" = "yes" ] && [ "$db_running" = "yes" ]; then echo "Running" elif [ "$shlink_running" = "no" ] && [ "$db_running" = "no" ]; then echo "Stopped" else echo "Error" fi