aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.04k stars 323 forks source link

Make aws_domainjoin.sh re-runnable by exiting if domain is already joined #351

Closed stuhay closed 3 years ago

stuhay commented 3 years ago

Issue #, if available: 349

Description of changes: aws_domainjoin.sh script modified to check whether the domain to be joined is already joined, and if so will exit cleanly.

This is needed as the set_hostname function in the script generates a new hostname on each run, which can cause the hostname to be different to the domain joined name.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

smhmhmd commented 3 years ago

Thank you for submitting the PR, we will run regression tests internally and get back to you.

ferkhat-aws commented 3 years ago

The commit has been merged outside of this pull-request. Closing.