mirror of
https://github.com/YunoHost-Apps/mygpo_ynh.git
synced 2024-09-03 19:55:52 +02:00
Bump version and fix envdir calls
This commit is contained in:
parent
eff624b855
commit
454280f513
4 changed files with 9 additions and 11 deletions
|
@ -9,9 +9,8 @@ purge=$2
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
env_path=$final_path/envs/prod
|
env_path=$final_path/envs/prod
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path || ynh_die
|
||||||
source $final_path/venv/bin/activate
|
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py shell <<< "
|
||||||
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py shell <<< "
|
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
User = get_user_model()
|
User = get_user_model()
|
||||||
try:
|
try:
|
||||||
|
@ -23,4 +22,4 @@ try:
|
||||||
except User.DoesNotExist:
|
except User.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
"
|
"
|
||||||
popd
|
popd || ynh_die
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Manage podcast subscriptions, and sync them between apps and devices",
|
"en": "Manage podcast subscriptions, and sync them between apps and devices",
|
||||||
"fr": "Gérez vos sousciptions balado, et sychronisez-lez entre vos applis et appareils"
|
"fr": "Gérez vos sousciptions balado, et sychronisez-lez entre vos applis et appareils"
|
||||||
},
|
},
|
||||||
"version": "2.11.1~ynh2",
|
"version": "2.11.1~ynh3",
|
||||||
"url": "https://github.com/gpodder/mygpo",
|
"url": "https://github.com/gpodder/mygpo",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -119,7 +119,6 @@ chown -R $app:$app $datadir
|
||||||
chmod o-rwx $datadir
|
chmod o-rwx $datadir
|
||||||
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $datadir
|
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $datadir
|
||||||
|
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=datadir --value="$datadir"
|
ynh_app_setting_set --app=$app --key=datadir --value="$datadir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -164,9 +163,9 @@ popd || ynh_die
|
||||||
#=================================================
|
#=================================================
|
||||||
pushd $final_path || ynh_die
|
pushd $final_path || ynh_die
|
||||||
chown -R root:$app $final_path
|
chown -R root:$app $final_path
|
||||||
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py makemigrations
|
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py makemigrations
|
||||||
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py migrate
|
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py migrate
|
||||||
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py createsuperuser --username "$admin" --email "$admin_email" --noinput -v 0
|
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py createsuperuser --username "$admin" --email "$admin_email" --noinput -v 0
|
||||||
chown -R root:root $final_path
|
chown -R root:root $final_path
|
||||||
popd || ynh_die
|
popd || ynh_die
|
||||||
|
|
||||||
|
|
|
@ -114,8 +114,8 @@ ynh_script_progression --message="Performing database migrations..." --weight=2
|
||||||
|
|
||||||
pushd $final_path || ynh_die
|
pushd $final_path || ynh_die
|
||||||
chown -R root:$app $final_path
|
chown -R root:$app $final_path
|
||||||
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py makemigrations
|
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py makemigrations
|
||||||
sudo -u $app $final_path/venv/bin/envdir $env_path python3 $final_path/manage.py migrate
|
sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py migrate
|
||||||
chown -R root:root $final_path
|
chown -R root:root $final_path
|
||||||
popd || ynh_die
|
popd || ynh_die
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue