Created
September 19, 2018 08:07
-
-
Save soloradish/dc70a4c1b67e050b082052a59fe86193 to your computer and use it in GitHub Desktop.
Script download verify install Amazon CloudWatch Agent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# require wget, unzip, gpg installed | |
# download package, gpg public key and signature files. | |
set -x | |
set -e | |
pushd $(mktemp -d) | |
wget https://s3.amazonaws.com/amazoncloudwatch-agent/linux/amd64/latest/AmazonCloudWatchAgent.zip | |
wget https://s3.amazonaws.com/amazoncloudwatch-agent/linux/amd64/latest/AmazonCloudWatchAgent.sig | |
wget https://s3.amazonaws.com/amazoncloudwatch-agent/assets/amazon-cloudwatch-agent.gpg | |
set +e | |
gpg --import amazon-cloudwatch-agent.gpg | |
set -e | |
gpg --verify AmazonCloudWatchAgent.sig AmazonCloudWatchAgent.zip | |
unzip ./AmazonCloudWatchAgent.zip | |
./install.sh | |
echo -e "Amazon CloudWatch Agent install at /opt/aws/amazon-cloudwatch-agent/" | |
popd | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment