diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-02-17 15:10:12 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-07-01 18:02:28 +0200 |
commit | 1bf501caf6c80d3221d2a73a1175b66ae69d7234 (patch) | |
tree | ea7d429db50effbd0b7bb3a538463dcd01bc8800 /install | |
parent | 6f61d50734fb58a8d8082de9f77fd15e5dc8ff99 (diff) | |
download | Ishtar-1bf501caf6c80d3221d2a73a1175b66ae69d7234.tar.bz2 Ishtar-1bf501caf6c80d3221d2a73a1175b66ae69d7234.zip |
ishtar-prepare-instance: allow username and password from the command line
Diffstat (limited to 'install')
-rwxr-xr-x | install/ishtar-prepare-instance | 7 |
1 files changed, 6 insertions, 1 deletions
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 .. |