You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
932 B
36 lines
932 B
2 years ago
|
#!/bin/bash
|
||
|
|
||
|
set -ueo pipefail
|
||
|
export PATH="/lib/rc/bin:$PATH"
|
||
|
|
||
1 year ago
|
. /var/db/repos/container/scripts/functions.sh
|
||
|
. /var/db/repos/calculate/scripts/ini.sh
|
||
2 years ago
|
|
||
|
if [[ $UID == 0 ]]
|
||
|
then
|
||
|
exit
|
||
|
fi
|
||
|
|
||
1 year ago
|
data=$(PGPASSWORD=${ini[postgresql.taiga_password]} psql -U ${ini[postgresql.taiga_user]} -d ${ini[postgresql.taiga_database]} -c '\dt' 2>/dev/null)
|
||
2 years ago
|
|
||
|
if [[ -n $data ]]
|
||
|
then
|
||
|
exit
|
||
|
fi
|
||
|
|
||
|
migrate_pgsql(){
|
||
|
cd ~
|
||
|
cd taiga-back
|
||
|
source .venv/bin/activate
|
||
|
DJANGO_SETTINGS_MODULE=settings.config python manage.py migrate --noinput
|
||
2 years ago
|
|
||
|
clear_buf
|
||
2 years ago
|
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
|
||
|
DJANGO_SETTINGS_MODULE=settings.config python manage.py compilemessages
|
||
|
DJANGO_SETTINGS_MODULE=settings.config python manage.py collectstatic --noinput
|
||
|
}
|
||
|
|
||
|
migrate_pgsql
|