From 89995f64192d5045ccf29100be25b1824d06d140 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Fri, 8 Sep 2023 13:53:56 +0200 Subject: [PATCH] Automatically create SECRET_KEY on `init` --- make.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/make.sh b/make.sh index 9dac38a..92c98af 100755 --- a/make.sh +++ b/make.sh @@ -7,6 +7,10 @@ init () { mkdir -p "partitioncloud/static/thumbnails" mkdir -p "partitioncloud/static/search-thumbnails" + if ! test -f "instance/config.py"; then + echo "SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex())')" > instance/config.py + done + if test -f "instance/partitioncloud.sqlite"; then printf "Souhaitez vous supprimer la base de données existante ? [y/n] " read -r CONFIRMATION