From 7e256f1902a3b6993b8c248c9102c7b7bc71554f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 1 Mar 2023 09:33:49 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index b8481b4..6811224 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,30 +27,30 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 fi # If the admin is not defined, We can't upgrade this app -if [ -z "$admin" ]; then +if [ -z "${admin:-}" ]; then ynh_die --message="This app can't be upgraded from a very old version of the package. Please remove and reinstall Moodle" fi # If the site_name is not defined -if [ -z "$site_name" ]; then +if [ -z "${site_name:-}" ]; then site_name="YunoHost" ynh_app_setting_set --app=$app --key=site_name --value=$site_name fi # If fpm_footprint doesn't exist, create it -if [ -z "$fpm_footprint" ]; then +if [ -z "${fpm_footprint:-}" ]; then fpm_footprint=low ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint fi # If fpm_free_footprint doesn't exist, create it -if [ -z "$fpm_free_footprint" ]; then +if [ -z "${fpm_free_footprint:-}" ]; then fpm_free_footprint=0 ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint fi # If fpm_usage doesn't exist, create it -if [ -z "$fpm_usage" ]; then +if [ -z "${fpm_usage:-}" ]; then fpm_usage=low ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi