From 7397126794310c6ab8180f6428ba16df1b7548dd Mon Sep 17 00:00:00 2001 From: Stefan Kunkel Date: Wed, 18 Nov 2020 13:25:28 +0100 Subject: [PATCH] adapt check119 to exclude instances shutting down brain fart: used logical 'or' instead of correct '&&' --- checks/check119 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks/check119 b/checks/check119 index 45530b98..63557bbe 100644 --- a/checks/check119 +++ b/checks/check119 @@ -25,7 +25,7 @@ check119(){ if [[ $INSTANCE_LIST ]]; then for instance in $INSTANCE_LIST; do STATE_NAME=$(echo $EC2_DATA | jq -r --arg i "$instance" 'select(.InstanceId==$i)|.StateName') - if [[ $STATE_NAME != "terminated" || $STATE_NAME != "shutting-down" ]]; then + if [[ $STATE_NAME != "terminated" && $STATE_NAME != "shutting-down" ]]; then PROFILEARN=$(echo $EC2_DATA | jq -r --arg i "$instance" 'select(.InstanceId==$i)|.ProfileArn') if [[ $PROFILEARN == "null" ]]; then textFail "$regx: Instance $instance not associated with an instance role" $regx