From 2dd371bc0ba734644316ee1d14f890e65f8d6769 Mon Sep 17 00:00:00 2001 From: hamilcarBarca17 Date: Tue, 11 Apr 2023 12:14:55 -0600 Subject: [PATCH] Fixed a bug in updating the instance IP on new instance startup --- aws-tools.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aws-tools.sh b/aws-tools.sh index db4fcf5..b7911cd 100644 --- a/aws-tools.sh +++ b/aws-tools.sh @@ -94,8 +94,9 @@ startInstance() { showGaugeBoxForAwsCommand "$desiredState" "Starting Your Instance" "Successfully Started Your Instance!" "Failed to start your instance!" printInfo "Checking to see if IP changed" instanceIp=$(getInstanceIp) - if [[ $instanceIp != $AWS_TEAM_BUILDING_EC2_INSTANCE_IP ]]; then + if [[ $instanceIp != "$AWS_TEAM_BUILDING_EC2_INSTANCE_IP" ]]; then setConfigValue "AWS_TEAM_BUILDING_EC2_INSTANCE_IP" "$instanceIp" + export AWS_TEAM_BUILDING_EC2_INSTANCE_IP="$instanceIp" createDcvConnectionProfileFromTemplate fi