lib/aws_ec2/scripts/cloudwatch.sh in aws-ec2-1.3.2 vs lib/aws_ec2/scripts/cloudwatch.sh in aws-ec2-1.4.0

- old
+ new

@@ -8,15 +8,17 @@ echo " $command ec2" exit 1 fi LOG_GROUP_NAME=$1 +# shellcheck disable=SC1091 source "/opt/aws-ec2/shared/functions.sh" -os=$(os_name) -if [ "$os" != "amazonlinux2" ]; then - echo "Sorry, enable cloudwatch logging with the aws-ec2 tool is only supported for amazonlinux2 currently" +OS=$(os_name) +if [ "$OS" != "amazonlinux2" ] || [ "$OS" != "ubuntu" ] ; then + echo "Sorry, enable cloudwatch logging with the aws-ec2 tool is only supported for amazonlinux2 and ubuntu" exit fi +export OS # used by the scripts to delegate to the right OS script /opt/aws-ec2/cloudwatch/install.sh /opt/aws-ec2/cloudwatch/configure.sh "$LOG_GROUP_NAME" /opt/aws-ec2/cloudwatch/service.sh