Skip to content

Commit 3fb9c64

Browse files
committed
Added a shell checker and commited the changes to secrets that work in bash
1 parent 6eb37a4 commit 3fb9c64

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

aws/build-an-deploy-aws.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@ else
2828
echo "CLUSTERNAME is not set or empty, defaulting to ${CLUSTERNAME}"
2929
fi
3030

31+
echo "Checking for compatible shell"
32+
case "$SHELL" in
33+
*bash*)
34+
echo "BASH detected"
35+
;;
36+
*zsh*)
37+
echo "ZSH detected"
38+
;;
39+
*)
40+
echo "🛑🛑 Unknown shell $SHELL, this script has only been tested on BASH and ZSH. Please be aware there may be some issues 🛑🛑"
41+
sleep 2
42+
;;
43+
esac
44+
3145
ACCOUNT_ID=$(aws sts get-caller-identity | jq '.Account' -r)
3246
echo "ACCOUNT_ID=${ACCOUNT_ID}"
3347

@@ -128,8 +142,8 @@ helm upgrade --install mj ../helm/wrongsecrets-ctf-party \
128142
export HELM_EXPERIMENTAL_OCI=1
129143
kubectl create namespace ctfd
130144
helm -n ctfd install ctfd oci://ghcr.io/bman46/ctfd/ctfd \
131-
--set="redis.auth.password=${$(openssl rand -base64 24)}" \
132-
--set="mariadb.auth.rootPassword=${$(openssl rand -base64 24)}" \
133-
--set="mariadb.auth.password=${$(openssl rand -base64 24)}" \
134-
--set="mariadb.auth.replicationPassword=${$(openssl rand -base64 24)}" \
145+
--set="redis.auth.password=$(openssl rand -base64 24)" \
146+
--set="mariadb.auth.rootPassword=$(openssl rand -base64 24)" \
147+
--set="mariadb.auth.password=$(openssl rand -base64 24)" \
148+
--set="mariadb.auth.replicationPassword=$(openssl rand -base64 24)" \
135149
--set="env.open.SECRET_KEY=test" # this key isn't actually necessary in a setup with CTFd

0 commit comments

Comments
 (0)