From e83989d6ed36ae6377d8803b3cadb2e3930b5304 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 21 Jan 2025 13:22:42 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 46830df..b8a8564 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -8,25 +8,10 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Ensuring downward compatibility..." -if [ -z ${custom_title:-} ]; then - custom_title="Send" - ynh_app_setting_set --key=custom_title --value="$custom_title" -fi - -if [ -z ${custom_description:-} ]; then - custom_description="Encrypt and send files with a link that automatically expires." - ynh_app_setting_set --key=custom_description --value="$custom_description" -fi - -if [ -z ${max_file_size:-} ]; then - max_file_size=100 - ynh_app_setting_set --key=max_file_size --value="$max_file_size" -fi - -if [ -z ${max_downloads:-} ]; then - max_downloads=100 - ynh_app_setting_set --key=max_downloads --value="$max_downloads" -fi +ynh_app_setting_set_default --key=custom_title --value="send" +ynh_app_setting_set_default --key=custom_description --value="Encrypt and send files with a link that automatically expires." +ynh_app_setting_set_default --key=max_file_size --value=100 +ynh_app_setting_set_default --key=max_downloads --value=100 #================================================= # STOP SYSTEMD SERVICE