From 58f441f3ee2e53b803034647d3651de4e99c2820 Mon Sep 17 00:00:00 2001 From: chandi Date: Mon, 13 Dec 2021 18:16:22 +0100 Subject: [PATCH] make default passwords obvious and set FSESL_PASSWORD --- sample.env | 9 +++++---- scripts/setup | 13 +++++-------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sample.env b/sample.env index cbe3b8e..3646d11 100644 --- a/sample.env +++ b/sample.env @@ -42,10 +42,11 @@ ENABLE_GREENLIGHT=true # SECRETS # ==================================== # important! change these to any random values -SHARED_SECRET=w6y7nycPafjPhVz3gZdBpQhR4H4MvEQzcZzia5LT -ETHERPAD_API_KEY=NEQKi2eFXSBce4kyGjwAzMn2jeF66peNYQmyFVRr -RAILS_SECRET=cdfbae48b197805a435ab7881da31c642ac1a7d4d5c006441efa8125ae63865ce7c915c651117e0f14358cd98f5287c431929e0f796f4100b2b1c3eb5baad1b0 -POSTGRESQL_SECRET=4xksXUDsaqAkZFSu8HF7pFppN34yy0a9g2iSqD14 +SHARED_SECRET=SuperSecret +ETHERPAD_API_KEY=SuperEtherpadKey +RAILS_SECRET=SuperRailsSecret +POSTGRESQL_SECRET=SuperPostgresSecret +FSESL_PASSWORD=SuperFreeswitchESLPassword diff --git a/scripts/setup b/scripts/setup index 7a3ad6b..189a157 100755 --- a/scripts/setup +++ b/scripts/setup @@ -186,17 +186,14 @@ fi RANDOM_1=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 40) RANDOM_2=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 40) RANDOM_3=$(head /dev/urandom | tr -dc a-f0-9 | head -c 128) -if [ ! "$greenlight" == "y" ] -then - RANDOM_4=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 40) -fi +RANDOM_4=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 40) +RANDOM_5=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 40) + sed -i "s/SHARED_SECRET=.*/SHARED_SECRET=$RANDOM_1/" .env sed -i "s/ETHERPAD_API_KEY=.*/ETHERPAD_API_KEY=$RANDOM_2/" .env sed -i "s/RAILS_SECRET=.*/RAILS_SECRET=$RANDOM_3/" .env -if [ ! "$greenlight" == "y" ] -then - sed -i "s/POSTGRESQL_SECRET=.*/POSTGRESQL_SECRET=$RANDOM_4/" .env -fi +sed -i "s/FSESL_PASSWORD=.*/FSESL_PASSWORD=$RANDOM_4/" .env +sed -i "s/POSTGRESQL_SECRET=.*/POSTGRESQL_SECRET=$RANDOM_5/" .env ./scripts/generate-compose