From 1bf501caf6c80d3221d2a73a1175b66ae69d7234 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 17 Feb 2020 15:10:12 +0100 Subject: ishtar-prepare-instance: allow username and password from the command line --- install/ishtar-prepare-instance | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'install') diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance index 4b62ec256..1df266c71 100755 --- a/install/ishtar-prepare-instance +++ b/install/ishtar-prepare-instance @@ -380,7 +380,12 @@ EOF done cecho y " - create superuser" - $PYTHON ./manage.py createsuperuser + + if [ -z "$SUPERUSER_NAME" ]; then + $PYTHON ./manage.py createsuperuser + else + $PYTHON ./manage.py shell -c "from django.contrib.auth.models import User; User.objects.create_superuser('"$SUPERUSER_NAME"', '', '"$SUPERUSER_PASSWORD"')" + fi cecho y " - post install script" cd .. -- cgit v1.2.3