Skip to content

Commit

Permalink
refactor: update userdata template script
Browse files Browse the repository at this point in the history
  • Loading branch information
luqmanbazran committed Oct 16, 2024
1 parent b6ea728 commit bb78678
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions user_data/template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
#Install aws cli
echo "Installing packages..."
dnf install -y unzip
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip"
unzip /tmp/awscliv2.zip -d /tmp
/tmp/aws/./install
if ! command -v aws > /dev/null; then
echo "The AWS CLI is not installed. Installing..."
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -i).zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
rm -rfv aws*
fi

#Create necessary folders/files
echo "Creating files and folders..."
Expand Down

0 comments on commit bb78678

Please sign in to comment.