feat: use is_container_status everywhere

This commit is contained in:
Jose Diaz-Gonzalez
2018-02-12 02:21:34 -05:00
parent 7a6d771689
commit a8d42ea8be
3 changed files with 7 additions and 6 deletions

View File

@@ -13,8 +13,11 @@ report_single_app() {
local APP_CIDS=$(get_app_container_ids "$APP"); local PROCS=0; local RUNNING=""
for CID in $APP_CIDS; do
local APP_CONTAINER_STATUS=$(docker inspect -f '{{.State.Running}}' "$CID" 2> /dev/null || true)
if [[ "$APP_CONTAINER_STATUS" == "true" ]]; then RUNNING+="0"; else RUNNING+="1"; fi
if (is_container_status "$CID" "Running"); then
RUNNING+="0"
else
RUNNING+="1"
fi
PROCS=$((PROCS + 1))
done