1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/chuwiki_ynh.git synced 2024-09-03 18:16:18 +02:00

Fix config panel variables

This commit is contained in:
Salamandar 2023-10-02 22:14:31 +02:00 committed by Félix Piédallu
parent c1a0cb2a6a
commit c2a3652fe9
2 changed files with 39 additions and 1 deletions

View file

@ -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
#=================================================

View file

@ -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
#=================================================