1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Update upgrade

This commit is contained in:
Éric Gaspar 2023-02-14 08:41:09 +01:00
parent bf2ba7b8ea
commit d72cb62289

View file

@ -15,9 +15,6 @@ source /usr/share/yunohost/helpers
ynh_script_progression --message="Loading installation settings..." --weight=3 ynh_script_progression --message="Loading installation settings..." --weight=3
user_home=$(ynh_app_setting_get --app=$app --key=user_home) user_home=$(ynh_app_setting_get --app=$app --key=user_home)
maintenance_mode=$(ynh_app_setting_get --app=$app --key=maintenance_mode)
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
@ -34,35 +31,29 @@ ynh_script_progression --message="Ensuring downward compatibility..."
ynh_app_setting_delete --app=$app --key=backup_core_only ynh_app_setting_delete --app=$app --key=backup_core_only
# If maintenance_mode doesn't exist, create it # If maintenance_mode doesn't exist, create it
if [ -z "$maintenance_mode" ]; then if [ -z "${maintenance_mode:-}" ]; then
maintenance_mode=0 maintenance_mode=0
ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode
fi fi
# If fpm_footprint doesn't exist, create it # If fpm_footprint doesn't exist, create it
if [ -z "$fpm_footprint" ]; then if [ -z "${fpm_footprint:-}" ]; then
fpm_footprint=high fpm_footprint=high
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
fi fi
# If fpm_free_footprint doesn't exist, create it # 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 fpm_free_footprint=0
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
fi fi
# If fpm_usage doesn't exist, create it # If fpm_usage doesn't exist, create it
if [ -z "$fpm_usage" ]; then if [ -z "${fpm_usage:-}" ]; then
fpm_usage=medium fpm_usage=medium
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
fi fi
# Create a permission if needed
#if ! ynh_permission_exists --permission="api"; then
# ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true"
#fi
# Delete existing ini configuration file (backward compatibility) # Delete existing ini configuration file (backward compatibility)
if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then
ynh_secure_remove --file=/etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ynh_secure_remove --file=/etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini