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:
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: