Fix status checking
This commit is contained in:
parent
9580b2dd7d
commit
1c437b99eb
8
abra
8
abra
@ -801,11 +801,15 @@ sub_app_list (){
|
|||||||
fi
|
fi
|
||||||
if [ -n "$STATUS" ]; then
|
if [ -n "$STATUS" ]; then
|
||||||
APP_STATUS=$( printf '%s\n' "${DEPLOYED_APPS[@]}" | grep -qP "^${SERVER}~${APP_STACK_NAME}$" && echo "deployed" || echo "inactive")
|
APP_STATUS=$( printf '%s\n' "${DEPLOYED_APPS[@]}" | grep -qP "^${SERVER}~${APP_STACK_NAME}$" && echo "deployed" || echo "inactive")
|
||||||
if [[ "$APP_STATUS" == "inactive" ]] && [[ ! ${CHECKED_SERVERS[*]} =~ ${SERVER} ]]; then
|
if [[ "$APP_STATUS" == "inactive" ]] ; then
|
||||||
CHECKED_SERVERS+=("$SERVER")
|
if [[ ${CHECKED_SERVERS[*]} =~ ${SERVER} ]]; then
|
||||||
|
APP_STATUS="unknown"
|
||||||
|
else
|
||||||
if ! docker context inspect "$SERVER" > /dev/null 2>&1; then
|
if ! docker context inspect "$SERVER" > /dev/null 2>&1; then
|
||||||
APP_STATUS="unknown"
|
APP_STATUS="unknown"
|
||||||
fi
|
fi
|
||||||
|
CHECKED_SERVERS+=("$SERVER")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
printf " %s\t%s\t%s%s\n" "$DOMAIN" "$TYPE" "$SERVER" "${STATUS:+ }${APP_STATUS}"
|
printf " %s\t%s\t%s%s\n" "$DOMAIN" "$TYPE" "$SERVER" "${STATUS:+ }${APP_STATUS}"
|
||||||
|
Reference in New Issue
Block a user