Created
May 7, 2024 17:35
-
-
Save alexolinux/c5920a48a6bd14237be2b433677512e8 to your computer and use it in GitHub Desktop.
Installation of granted for AWS account profile management
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
#!/bin/bash | |
#https://docs.commonfate.io/granted/getting-started#verify-the-installation | |
GRANTED_HOME="/usr/local/granted" | |
DEST="/usr/local/bin" | |
TTMP="/tmp/tarball" | |
clear && \ | |
mkdir $TTMP && cd $TTMP && \ | |
curl -OL https://releases.commonfate.io/granted/v0.21.1/granted_0.21.1_linux_x86_64.tar.gz | |
if [ "$?" -eq 0 ]; then | |
printf "Granted downloaded successfully. Uncompressing to destination folder..." | |
sudo mkdir "${GRANTED_HOME}" | |
sudo tar -xzvf granted_0.21.1_linux_x86_64.tar.gz -C "${GRANTED_HOME}" | |
sudo ln -s "${GRANTED_HOME}/granted" "${DEST}" | |
if [ "$?" -eq 0 ]; then | |
"Granted has been installed succesfully!" | |
granted -v | |
else | |
printf "Failure during the installation process. Granted not installed." | |
exit 1 | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment