1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

Fix swap values

This commit is contained in:
Kayou 2019-05-07 00:37:07 +02:00
parent 4c45e7cb65
commit d5e44d9769
No known key found for this signature in database
GPG key ID: 823A2CBE071D3126
3 changed files with 18 additions and 18 deletions

View file

@ -123,14 +123,14 @@ total_swap=$(ynh_check_ram --only_swap)
swap_needed=0 swap_needed=0
# https://docs.gitlab.com/ee/install/requirements.html#memory # https://docs.gitlab.com/ee/install/requirements.html#memory
if [ $total_memory -lt 8000 ]; then if [ $total_memory -lt 8192 ]; then
# Need a minimum of 8Gb of memory # Need a minimum of 8Gbo of memory
swap_needed=$((8000 - $total_memory)) swap_needed=$((8192 - $total_memory))
fi fi
# Need at least 2Gb of swap # Need at least 2Go of swap
if [ $(($total_swap + $swap_needed)) -lt 2000 ]; then if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then
swap_needed=$((2000 - $total_swap)) swap_needed=$((2048 - $total_swap))
fi fi
ynh_print_info "Adding $swap_needed to swap..." ynh_print_info "Adding $swap_needed to swap..."

View file

@ -71,14 +71,14 @@ total_swap=$(ynh_check_ram --only_swap)
swap_needed=0 swap_needed=0
# https://docs.gitlab.com/ee/install/requirements.html#memory # https://docs.gitlab.com/ee/install/requirements.html#memory
if [ $total_memory -lt 8000 ]; then if [ $total_memory -lt 8192 ]; then
# Need a minimum of 8Gb of memory # Need a minimum of 8Gbo of memory
swap_needed=$((8000 - $total_memory)) swap_needed=$((8192 - $total_memory))
fi fi
# Need at least 2Gb of swap # Need at least 2Go of swap
if [ $(($total_swap + $swap_needed)) -lt 2000 ]; then if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then
swap_needed=$((2000 - $total_swap)) swap_needed=$((2048 - $total_swap))
fi fi
ynh_print_info "Adding $swap_needed to swap..." ynh_print_info "Adding $swap_needed to swap..."

View file

@ -183,14 +183,14 @@ total_swap=$(ynh_check_ram --only_swap)
swap_needed=0 swap_needed=0
# https://docs.gitlab.com/ee/install/requirements.html#memory # https://docs.gitlab.com/ee/install/requirements.html#memory
if [ $total_memory -lt 8000 ]; then if [ $total_memory -lt 8192 ]; then
# Need a minimum of 8Gb of memory # Need a minimum of 8Gbo of memory
swap_needed=$((8000 - $total_memory)) swap_needed=$((8192 - $total_memory))
fi fi
# Need at least 2Gb of swap # Need at least 2Go of swap
if [ $(($total_swap + $swap_needed)) -lt 2000 ]; then if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then
swap_needed=$((2000 - $total_swap)) swap_needed=$((2048 - $total_swap))
fi fi
ynh_print_info "Adding $swap_needed to swap..." ynh_print_info "Adding $swap_needed to swap..."