|
@@ -54,9 +54,13 @@ else
|
|
python manage.py migrate --noinput
|
|
python manage.py migrate --noinput
|
|
fi
|
|
fi
|
|
|
|
|
|
-# this is done here since old taiga installations do not have a superadmin
|
|
|
|
-echo "=> Create superadmin"
|
|
|
|
-python manage.py loaddata initial_user
|
|
|
|
|
|
+# this is not done on new install path, since old taiga installations would not hit that
|
|
|
|
+if ! python manage.py shell -c 'from django.contrib.auth import get_user_model; u=get_user_model().objects.filter(is_superuser=True).first(); print(u.username)' | grep admin; then
|
|
|
|
+ echo "=> Create superadmin"
|
|
|
|
+ python manage.py loaddata initial_user
|
|
|
|
+else
|
|
|
|
+ echo "=> Superadmin already exists"
|
|
|
|
+fi
|
|
|
|
|
|
echo "=> Make cloudron own /run"
|
|
echo "=> Make cloudron own /run"
|
|
chown -R cloudron:cloudron /run
|
|
chown -R cloudron:cloudron /run
|