Fix status checking
This commit is contained in:
		
							
								
								
									
										10
									
								
								abra
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								abra
									
									
									
									
									
								
							@ -801,10 +801,14 @@ sub_app_list (){
 | 
			
		||||
    fi
 | 
			
		||||
    if [ -n "$STATUS" ]; then
 | 
			
		||||
      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
 | 
			
		||||
        CHECKED_SERVERS+=("$SERVER")
 | 
			
		||||
        if ! docker context inspect "$SERVER" > /dev/null 2>&1; then
 | 
			
		||||
      if [[ "$APP_STATUS" == "inactive" ]] ; then
 | 
			
		||||
        if [[ ${CHECKED_SERVERS[*]} =~ ${SERVER} ]]; then
 | 
			
		||||
          APP_STATUS="unknown"
 | 
			
		||||
        else
 | 
			
		||||
          if ! docker context inspect "$SERVER" > /dev/null 2>&1; then
 | 
			
		||||
            APP_STATUS="unknown"
 | 
			
		||||
          fi
 | 
			
		||||
          CHECKED_SERVERS+=("$SERVER")
 | 
			
		||||
        fi
 | 
			
		||||
      fi
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user