1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/funkwhale_ynh.git synced 2024-09-03 18:36:24 +02:00

ynh_exec_warn_less

This commit is contained in:
yalh76 2022-01-07 20:02:59 +01:00
parent dd9914eff7
commit 978a4d73f8
2 changed files with 10 additions and 10 deletions

View file

@ -173,8 +173,8 @@ pushd $final_path
source $final_path/virtualenv/bin/activate source $final_path/virtualenv/bin/activate
pip install --upgrade pip pip install --upgrade pip
pip install --upgrade setuptools pip install --upgrade setuptools
pip install wheel ynh_exec_warn_less pip install wheel
pip install -r api/requirements.txt ynh_exec_warn_less pip install -r api/requirements.txt
popd popd
#================================================= #=================================================
@ -187,10 +187,10 @@ pushd $final_path
# needed for enabling the 'unaccent' extension # needed for enabling the 'unaccent' extension
ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH SUPERUSER;" --database="$db_name" ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH SUPERUSER;" --database="$db_name"
python api/manage.py migrate ynh_exec_warn_less python api/manage.py migrate
ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH NOSUPERUSER;" --database="$db_name" ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH NOSUPERUSER;" --database="$db_name"
echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('$admin', '$admin_mail', 'funkwhale') " | python api/manage.py shell echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('$admin', '$admin_mail', 'funkwhale') " | ynh_exec_warn_less python api/manage.py shell
echo "yes" | python api/manage.py collectstatic echo "yes" | ynh_exec_warn_less python api/manage.py collectstatic
popd popd
chmod 750 "$final_path" chmod 750 "$final_path"

View file

@ -196,8 +196,8 @@ pushd $final_path
source $final_path/virtualenv/bin/activate source $final_path/virtualenv/bin/activate
pip install --upgrade pip pip install --upgrade pip
pip install --upgrade setuptools pip install --upgrade setuptools
pip install wheel ynh_exec_warn_less pip install wheel
pip install -r api/requirements.txt ynh_exec_warn_less pip install -r api/requirements.txt
popd popd
#================================================= #=================================================
@ -220,10 +220,10 @@ pushd $final_path
# needed for enabling the 'unaccent' extension # needed for enabling the 'unaccent' extension
ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH SUPERUSER;" --database="$db_name" ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH SUPERUSER;" --database="$db_name"
python api/manage.py migrate ynh_exec_warn_less python api/manage.py migrate
ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH NOSUPERUSER;" --database="$db_name" ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH NOSUPERUSER;" --database="$db_name"
echo "yes" | python api/manage.py collectstatic --clear --noinput echo "yes" | ynh_exec_warn_less python api/manage.py collectstatic --clear --noinput
# https://code.eliotberriot.com/funkwhale/funkwhale/tags/0.16 # users-now-have-an-activitypub-actor-manual-action-required # https://code.eliotberriot.com/funkwhale/funkwhale/tags/0.16 # users-now-have-an-activitypub-actor-manual-action-required
# python api/manage.py script create_actors --no-input # python api/manage.py script create_actors --no-input
@ -241,7 +241,7 @@ pushd $final_path
# higher quality images # higher quality images
# https://docs.funkwhale.audio/changelog.html#increased-quality-of-jpeg-thumbnails-manual-action-required # https://docs.funkwhale.audio/changelog.html#increased-quality-of-jpeg-thumbnails-manual-action-required
ynh_secure_remove --file="$final_path/media/__sized__" ynh_secure_remove --file="$final_path/media/__sized__"
python api/manage.py fw media generate-thumbnails ynh_exec_warn_less python api/manage.py fw media generate-thumbnails
popd popd
chmod 750 "$final_path" chmod 750 "$final_path"