Browse Source

check status container

master
zeus 3 years ago
parent
commit
4a52bf6d5f
  1. 14
      check-services.sh

14
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
Loading…
Cancel
Save