mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
Merge pull request #45 Fix upgrade and hamonize packages
Fix upgrade and hamonize packages
This commit is contained in:
commit
1ccf0ccd2c
2 changed files with 22 additions and 3 deletions
|
@ -70,6 +70,17 @@ fi
|
|||
# Remove the option backup_core_only if it's in the settings.yml file
|
||||
ynh_app_setting_delete "$app" backup_core_only
|
||||
|
||||
code_migration=$(ynh_app_setting_get "$app" code_migration)
|
||||
|
||||
# make sure we revert the last code organization
|
||||
if [ "$code_migration" -eq 1 ]
|
||||
then
|
||||
mv "$final_path/code/"* "$final_path"
|
||||
mv "$final_path/media" "$final_path/code/data/media"
|
||||
mv "$final_path/import" "$final_path/code/data/music"
|
||||
ynh_secure_remove "$final_path/code"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -85,7 +96,7 @@ ynh_system_user_create "$app"
|
|||
|
||||
ynh_install_app_dependencies build-essential curl ffmpeg \
|
||||
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \
|
||||
redis-server \
|
||||
redis-server libldap2-dev libsasl2-dev \
|
||||
`# add arm support` \
|
||||
zlib1g-dev libffi-dev libssl-dev
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ if [ ! -d "$final_path/code/" ]; then
|
|||
mv "$final_path/!(code)" "$final_path/code/"
|
||||
mv "$final_path/code/data/media" "$final_path/media"
|
||||
mv "$final_path/code/data/music" "$final_path/import"
|
||||
ynh_app_setting_set "$app" code_migration 1
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -119,7 +120,7 @@ ynh_system_user_create "$app"
|
|||
|
||||
ynh_install_app_dependencies build-essential curl ffmpeg \
|
||||
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \
|
||||
redis-server \
|
||||
redis-server libldap2-dev libsasl2-dev \
|
||||
`# add arm support` \
|
||||
zlib1g-dev libffi-dev libssl-dev
|
||||
|
||||
|
@ -231,8 +232,15 @@ then
|
|||
# makes sure no SSO credentials to be passed
|
||||
ynh_app_setting_set "$app" skipped_uris "/"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
|
||||
systemctl reload nginx
|
||||
systemctl reload nginx
|
||||
|
||||
#=================================================
|
||||
# REMOVE CODE MIGRATION FLAG
|
||||
#=================================================
|
||||
|
||||
ynh_app_setting_delete "$app" code_migration
|
Loading…
Reference in a new issue