diff --git a/scripts/install b/scripts/install index 829b6d2..4c348f5 100755 --- a/scripts/install +++ b/scripts/install @@ -10,7 +10,21 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD MODIFICATIONS +# STORE SETTINGS FROM MANIFEST +#================================================= + +fpm_footprint="high" +fpm_free_footprint=0 +fpm_usage="medium" + +#================================================= +# STORE SETTINGS FROM MANIFEST +#================================================= + +ynh_app_setting_set --app="$app" --key=fpm_footprint --value="$fpm_footprint" +ynh_app_setting_set --app="$app" --key=fpm_free_footprint --value="$fpm_free_footprint" +ynh_app_setting_set --app="$app" --key=fpm_usage --value="$fpm_usage" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e4d98fd..02da7a8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,30 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +# If maintenance_mode doesn't exist, create it +if [ -z "${maintenance_mode:-}" ]; then + maintenance_mode=0 + ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode +fi + +# If fpm_footprint doesn't exist, create it +if [ -z "${fpm_footprint:-}" ]; then + fpm_footprint=high + 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 + 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 + fpm_usage=medium + ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #=================================================