diff options
Diffstat (limited to 'scripts/upgrade')
| -rw-r--r-- | scripts/upgrade | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/upgrade b/scripts/upgrade index 9e02c01..fd58f16 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -233,9 +233,9 @@ ynh_script_progression --message="Adding swap if needed..." --weight=7 total_memory=$(ynh_get_ram --total) swap_needed=0 -if [ $total_memory -lt 2560 ]; then +if [ $total_memory -lt $MEMORY_NEEDED ]; then # Need a minimum of 8Go of memory - swap_needed=$((2560 - $total_memory)) + swap_needed=$(($MEMORY_NEEDED - $total_memory)) fi ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 |
