diff --git a/check-services.sh b/check-services.sh new file mode 100755 index 0000000..42f1f84 --- /dev/null +++ b/check-services.sh @@ -0,0 +1,14 @@ +#!/bin/bash + + + +running="$(docker-compose ps --services --filter "status=running")" +services="$(docker-compose ps --services)" +if [ "$running" != "$services" ]; then + # Bash specific + RUN=$(comm -13 <(sort <<<"$running") <(sort <<<"$services")) + echo "Following_services_are_not_running:" + echo "$RUN" + else + echo "All_services_are_running" +fi