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:
parent
4c45e7cb65
commit
d5e44d9769
3 changed files with 18 additions and 18 deletions
|
@ -123,14 +123,14 @@ total_swap=$(ynh_check_ram --only_swap)
|
|||
swap_needed=0
|
||||
|
||||
# https://docs.gitlab.com/ee/install/requirements.html#memory
|
||||
if [ $total_memory -lt 8000 ]; then
|
||||
# Need a minimum of 8Gb of memory
|
||||
swap_needed=$((8000 - $total_memory))
|
||||
if [ $total_memory -lt 8192 ]; then
|
||||
# Need a minimum of 8Gbo of memory
|
||||
swap_needed=$((8192 - $total_memory))
|
||||
fi
|
||||
|
||||
# Need at least 2Gb of swap
|
||||
if [ $(($total_swap + $swap_needed)) -lt 2000 ]; then
|
||||
swap_needed=$((2000 - $total_swap))
|
||||
# Need at least 2Go of swap
|
||||
if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then
|
||||
swap_needed=$((2048 - $total_swap))
|
||||
fi
|
||||
|
||||
ynh_print_info "Adding $swap_needed to swap..."
|
||||
|
|
|
@ -71,14 +71,14 @@ total_swap=$(ynh_check_ram --only_swap)
|
|||
swap_needed=0
|
||||
|
||||
# https://docs.gitlab.com/ee/install/requirements.html#memory
|
||||
if [ $total_memory -lt 8000 ]; then
|
||||
# Need a minimum of 8Gb of memory
|
||||
swap_needed=$((8000 - $total_memory))
|
||||
if [ $total_memory -lt 8192 ]; then
|
||||
# Need a minimum of 8Gbo of memory
|
||||
swap_needed=$((8192 - $total_memory))
|
||||
fi
|
||||
|
||||
# Need at least 2Gb of swap
|
||||
if [ $(($total_swap + $swap_needed)) -lt 2000 ]; then
|
||||
swap_needed=$((2000 - $total_swap))
|
||||
# Need at least 2Go of swap
|
||||
if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then
|
||||
swap_needed=$((2048 - $total_swap))
|
||||
fi
|
||||
|
||||
ynh_print_info "Adding $swap_needed to swap..."
|
||||
|
|
|
@ -183,14 +183,14 @@ total_swap=$(ynh_check_ram --only_swap)
|
|||
swap_needed=0
|
||||
|
||||
# https://docs.gitlab.com/ee/install/requirements.html#memory
|
||||
if [ $total_memory -lt 8000 ]; then
|
||||
# Need a minimum of 8Gb of memory
|
||||
swap_needed=$((8000 - $total_memory))
|
||||
if [ $total_memory -lt 8192 ]; then
|
||||
# Need a minimum of 8Gbo of memory
|
||||
swap_needed=$((8192 - $total_memory))
|
||||
fi
|
||||
|
||||
# Need at least 2Gb of swap
|
||||
if [ $(($total_swap + $swap_needed)) -lt 2000 ]; then
|
||||
swap_needed=$((2000 - $total_swap))
|
||||
# Need at least 2Go of swap
|
||||
if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then
|
||||
swap_needed=$((2048 - $total_swap))
|
||||
fi
|
||||
|
||||
ynh_print_info "Adding $swap_needed to swap..."
|
||||
|
|
Loading…
Add table
Reference in a new issue