From fe3143d46993a80a4522b68a617f29973fa0ac98 Mon Sep 17 00:00:00 2001 From: Alexander Tratsevskiy Date: Sun, 13 Nov 2022 22:41:35 +0300 Subject: [PATCH] =?UTF-8?q?taiga:=20=D0=BE=D1=87=D0=B8=D1=81=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=B1=D1=83=D1=84=D0=B5=D1=80=D0=B0=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B4=20=D0=B2=D0=B2=D0=BE=D0=B4=D0=BE=D0=BC=20?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85=20=D1=83=D1=87=D0=B5=D1=82?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B0=D0=B4=D0=BC=D0=B8=D0=BD=D0=B8=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/functions.sh | 7 +++++++ scripts/taiga-www-migrate.sh | 2 ++ 2 files changed, 9 insertions(+) diff --git a/scripts/functions.sh b/scripts/functions.sh index 95b0d00..e6393b2 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -21,3 +21,10 @@ get_ini(){ eval $all } +# Clear stdin before reading +clear_buf(){ + while read -r -t 0 + do read -r + done + read -t 0.01 -n 10000 discard +} diff --git a/scripts/taiga-www-migrate.sh b/scripts/taiga-www-migrate.sh index f0b7303..8209a62 100755 --- a/scripts/taiga-www-migrate.sh +++ b/scripts/taiga-www-migrate.sh @@ -23,6 +23,8 @@ migrate_pgsql(){ cd taiga-back source .venv/bin/activate DJANGO_SETTINGS_MODULE=settings.config python manage.py migrate --noinput + + clear_buf einfo create an administrator with strong password CELERY_ENABLED=False DJANGO_SETTINGS_MODULE=settings.config python manage.py createsuperuser DJANGO_SETTINGS_MODULE=settings.config python manage.py loaddata initial_project_templates