repaired create_admin script
This commit is contained in:
parent
225a8d60bc
commit
4e22257f10
1 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
python3 mysite/manage.py shell -c "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'a@a.com', 'test1234')"
|
||||
if [ $# != 4 ]
|
||||
then
|
||||
echo "expected 4 arguments (webserver-pod-name, username, email, password)"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
kubectl exec $1 -- python3 manage.py shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('$2', '$3', '$4')"
|
||||
|
|
Loading…
Reference in a new issue