From 17a2f78059ecde108d646d9f0a47ca92c0c26fe4 Mon Sep 17 00:00:00 2001 From: rosbeef andino Date: Mon, 4 Apr 2022 12:46:34 -0400 Subject: [PATCH] Update restore --- scripts/restore | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/restore b/scripts/restore index 702caea..149a837 100644 --- a/scripts/restore +++ b/scripts/restore @@ -31,6 +31,8 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +max_memory=$(ynh_app_setting_get --app=$app --key=max_memory) + focus_user=$(ynh_app_setting_get --app=$app --key=focus_user) focus_password=$(ynh_app_setting_get --app=$app --key=focus_password) focus_secret=$(ynh_app_setting_get --app=$app --key=focus_secret) @@ -50,6 +52,12 @@ ynh_script_progression --message="Validating restoration parameters..." test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " +# If max_memory doesn't exist, create it and set to default 3074 mb value +if [ -z "$max_memory" ]; then + max_memory=3072 + ynh_app_setting_set --app=$app --key=final_path --value=$max_memory +fi + #================================================= # STANDARD RESTORATION STEPS #=================================================