aws / amazon-ecs-init

Amazon Elastic Container Service RPM
http://aws.amazon.com/ecs
Apache License 2.0
199 stars 118 forks source link

ECS-A script remove unrequired start ssm-agent #454

Closed prateekchaudhry closed 2 years ago

prateekchaudhry commented 2 years ago

Summary / Implementation details

If $NO_START variable is true, the script should not start the ssm agent. But current behavior is that it will fall through the if else clause and the systemctl start "$SSM_SERVICE_NAME" is executed irrespective of the variable. Note that it is executed twice if the variable is set to false. This change fixes it by removing the second unrequired command.

Testing

Tested by verifying instances are getting connected to cluster for centos 7 and AL2, and change goes through CI tests

Licensing

This contribution is under the terms of the Apache 2.0 License: