about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xsetup.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/setup.sh b/setup.sh
index 18db0f1..b05f0c4 100755
--- a/setup.sh
+++ b/setup.sh
@@ -16,6 +16,15 @@ read -e -p "CTFNAME: " -i "FlexCTF" CTFNAME
 echo "HOSTNAME=$HOSTNAME" > .env
 echo "CTFNAME=$CTFNAME" >> .env
 
+# Read Traefik creds from the user
+read -e -p "Traefik username: " -i "traefik" TRAEFIK_USER
+read -e -p "Traefik password: " -i "secret" TRAEFIK_PASSWORD
+
+# Create the traefik creds string (user:pass)
+TRAEFIK_CREDS=$(htpasswd -nb $TRAEFIK_USER $TRAEFIK_PASSWORD)
+
+echo TRAEFIK_CREDS >> traefik_users
+
 # Grafana settings
 read -e -p "Grafana server: " -i "https://grafana.$HOSTNAME:3000" GF_SERVER_ROOT_URL
 read -e -p "Grafana admin pwd: " -i "secret" GF_SECURITY_ADMIN_PASSWORD