From d8ea0322f9193d2400c806a9dad88a4d6f058d8a Mon Sep 17 00:00:00 2001 From: Chris Caplan Date: Sat, 6 Mar 2021 19:45:16 +0000 Subject: [PATCH] changed to use apt-get and moved apt-get update to below if so it dont do unnecessary update --- root/etc/cont-init.d/98-aws-cli-install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/98-aws-cli-install b/root/etc/cont-init.d/98-aws-cli-install index 81c5071..8391cd1 100644 --- a/root/etc/cont-init.d/98-aws-cli-install +++ b/root/etc/cont-init.d/98-aws-cli-install @@ -2,7 +2,7 @@ echo "*** AWSCLI Installer ***" echo "Checking if awscli is installed" -apt update + if ! aws -v COMMAND &> /dev/null; then echo "aws not installed, installing now..." @@ -10,7 +10,8 @@ if ! aws -v COMMAND &> /dev/null; then if ! pip -v COMMAND &> /dev/null then echo "pip3 not installed, installing now..." - apt install python3 python3-pip -y + apt-get update + apt-get install python3 python3-pip -y pip3 install awscli fi