1
0
Fork 0
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:
Jean-Baptiste 2018-10-27 14:19:48 +02:00 committed by GitHub
commit 1ccf0ccd2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 3 deletions

View file

@ -70,6 +70,17 @@ fi
# Remove the option backup_core_only if it's in the settings.yml file # Remove the option backup_core_only if it's in the settings.yml file
ynh_app_setting_delete "$app" backup_core_only 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 # RECREATE THE DEDICATED USER
#================================================= #=================================================
@ -85,7 +96,7 @@ ynh_system_user_create "$app"
ynh_install_app_dependencies build-essential curl ffmpeg \ ynh_install_app_dependencies build-essential curl ffmpeg \
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \ libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \
redis-server \ redis-server libldap2-dev libsasl2-dev \
`# add arm support` \ `# add arm support` \
zlib1g-dev libffi-dev libssl-dev zlib1g-dev libffi-dev libssl-dev

View file

@ -41,6 +41,7 @@ if [ ! -d "$final_path/code/" ]; then
mv "$final_path/!(code)" "$final_path/code/" mv "$final_path/!(code)" "$final_path/code/"
mv "$final_path/code/data/media" "$final_path/media" mv "$final_path/code/data/media" "$final_path/media"
mv "$final_path/code/data/music" "$final_path/import" mv "$final_path/code/data/music" "$final_path/import"
ynh_app_setting_set "$app" code_migration 1
fi fi
#================================================= #=================================================
@ -119,7 +120,7 @@ ynh_system_user_create "$app"
ynh_install_app_dependencies build-essential curl ffmpeg \ ynh_install_app_dependencies build-essential curl ffmpeg \
libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \ libjpeg-dev libmagic-dev libpq-dev postgresql python3-dev python3-venv \
redis-server \ redis-server libldap2-dev libsasl2-dev \
`# add arm support` \ `# add arm support` \
zlib1g-dev libffi-dev libssl-dev zlib1g-dev libffi-dev libssl-dev
@ -231,8 +232,15 @@ then
# makes sure no SSO credentials to be passed # makes sure no SSO credentials to be passed
ynh_app_setting_set "$app" skipped_uris "/" ynh_app_setting_set "$app" skipped_uris "/"
fi fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
systemctl reload nginx systemctl reload nginx
#=================================================
# REMOVE CODE MIGRATION FLAG
#=================================================
ynh_app_setting_delete "$app" code_migration