From 0dbc3b2af28c7ffdb9c74b22c0201f42f2a06c74 Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Thu, 21 Sep 2023 22:52:59 +0200 Subject: [PATCH] Fix superuser creation in startup.sh Test CREATE_SUPERUSER variable correctly. --- mira/VERSION | 2 +- startup.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mira/VERSION b/mira/VERSION index b502146..3d54442 100644 --- a/mira/VERSION +++ b/mira/VERSION @@ -1 +1 @@ -3.0.2 +3.0.2a diff --git a/startup.sh b/startup.sh index 331ee7d..d2a0136 100755 --- a/startup.sh +++ b/startup.sh @@ -19,8 +19,8 @@ python manage.py collectstatic --noinput python manage.py migrate python manage.py makemessages -i venv -l fr python manage.py compilemessages -i venv -l fr -if [ -z "$CREATE_SUPERUSER" ]; then +if [ ! -z ${CREATE_SUPERUSER+x} ]; then python manage.py createsuperuser fi -exec gunicorn --chdir mira --bind :8000 --env RUN_MAIN=true mira.wsgi:application \ No newline at end of file +exec gunicorn --chdir mira --bind :8000 --env RUN_MAIN=true mira.wsgi:application