From 9f9cb08ee8c9ba11604952334e5ddfad35196a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 Feb 2023 16:11:21 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f3cd819..ebad1b7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,18 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=2 - -enable_downloads=$(ynh_app_setting_get --app=$app --key=enable_downloads) -scanner_extractor=$(ynh_app_setting_get --app=$app --key=scanner_extractor) -enable_animation=$(ynh_app_setting_get --app=$app --key=enable_animation) -enable_transcoding=$(ynh_app_setting_get --app=$app --key=enable_transcoding) -welcome_message=$(ynh_app_setting_get --app=$app --key=welcome_message) -enable_sharing=$(ynh_app_setting_get --app=$app --key=enable_sharing) - #================================================= # CHECK VERSION #================================================= @@ -41,37 +29,37 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -if [ -z "$language" ]; then +if [ -z "${language:-}" ]; then language="en" ynh_app_setting_set --app=$app --key=language --value=$language fi -if [ -z "$enable_animation" ]; then +if [ -z "${enable_animation:-}" ]; then enable_animation="true" ynh_app_setting_set --app=$app --key=enable_animation --value=$enable_animation fi -if [ -z "$enable_downloads" ]; then +if [ -z "${enable_downloads:-}" ]; then enable_downloads="true" ynh_app_setting_set --app=$app --key=enable_downloads --value=$enable_downloads fi -if [ -z "$scanner_extractor" ]; then +if [ -z "${scanner_extractor:-}" ]; then scanner_extractor="taglib" ynh_app_setting_set --app=$app --key=scanner_extractor --value=$scanner_extractor fi -if [ -z "$enable_transcoding" ]; then +if [ -z "${enable_transcoding:-}" ]; then enable_transcoding="false" ynh_app_setting_set --app=$app --key=enable_transcoding --value=$enable_transcoding fi -if [ -z "$welcome_message" ]; then +if [ -z "${welcome_message:-}" ]; then welcome_message="" ynh_app_setting_set --app=$app --key=welcome_message --value=$welcome_message fi -if [ -z "$enable_sharing" ]; then +if [ -z "${enable_sharing:-}" ]; then enable_sharing="false" ynh_app_setting_set --app=$app --key=enable_sharing --value=$enable_sharing fi