diff options
| author | yalh76 <yalh@yahoo.com> | 2020-05-26 13:19:50 +0200 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2020-05-26 13:19:50 +0200 |
| commit | f2051e67a3a7ee03254677434a35209beff2225b (patch) | |
| tree | 5c83a5918b3e7a34b2d34437471c085eaec8742c /scripts/install | |
| parent | 9c47591da2ba69b548382ac324702217733b1ec9 (diff) | |
| download | mastodon_ynh-f2051e67a3a7ee03254677434a35209beff2225b.tar.gz mastodon_ynh-f2051e67a3a7ee03254677434a35209beff2225b.tar.bz2 mastodon_ynh-f2051e67a3a7ee03254677434a35209beff2225b.zip | |
$MEMORY_NEEDED factorisation
Diffstat (limited to 'scripts/install')
| -rw-r--r-- | scripts/install | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/install b/scripts/install index 97dee20..8c63cde 100644 --- a/scripts/install +++ b/scripts/install @@ -136,9 +136,9 @@ ynh_script_progression --message="Adding swap is needed..." --weight=4 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 2.5Go 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 |
