aboutsummaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
authoryalh76 <yalh@yahoo.com>2020-05-26 13:18:02 +0200
committeryalh76 <yalh@yahoo.com>2020-05-26 13:18:02 +0200
commit3d713af143776d074d2f37cb0689d777aa632fdf (patch)
tree599ebd2041dbaa97ccc356b9f189b1fd7518ee27 /scripts/install
parent80b83a846130e81af1ba20ee5b006d80367edf31 (diff)
downloadmastodon_ynh-3d713af143776d074d2f37cb0689d777aa632fdf.tar.gz
mastodon_ynh-3d713af143776d074d2f37cb0689d777aa632fdf.tar.bz2
mastodon_ynh-3d713af143776d074d2f37cb0689d777aa632fdf.zip
Moving from ynh_check_ram to ynh_get_ram
Diffstat (limited to 'scripts/install')
-rw-r--r--scripts/install6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/install b/scripts/install
index 388b2a3..97dee20 100644
--- a/scripts/install
+++ b/scripts/install
@@ -9,7 +9,6 @@
source _common.sh
source ynh_install_ruby__2
source ynh_add_swap
-source ynh_check_ram
source /usr/share/yunohost/helpers
#=================================================
@@ -134,12 +133,11 @@ ynh_system_user_create --username=$app --home_dir=$final_path
#=================================================
ynh_script_progression --message="Adding swap is needed..." --weight=4
-total_memory=$(ynh_check_ram)
-total_swap=$(ynh_check_ram --only_swap)
+total_memory=$(ynh_get_ram --total)
swap_needed=0
if [ $total_memory -lt 2560 ]; then
- # Need a minimum of 8Go of memory
+ # Need a minimum of 2.5Go of memory
swap_needed=$((2560 - $total_memory))
fi