From 38cd19c3d4f5e1308acef0dbde5d386d5c9e78c6 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 11 May 2019 01:41:46 +0200 Subject: [PATCH] swap with getops --- scripts/install | 4 ++-- scripts/restore | 5 ++--- scripts/upgrade | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index f732768..651f4c0 100644 --- a/scripts/install +++ b/scripts/install @@ -131,8 +131,8 @@ if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then swap_needed=$((2048 - $total_swap)) fi -ynh_print_info "Adding $swap_needed to swap..." -ynh_add_swap $swap_needed +ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 +ynh_add_swap --size=$swap_needed #================================================= # PRECONFIGURE GITLAB diff --git a/scripts/restore b/scripts/restore index df17fc7..591c328 100644 --- a/scripts/restore +++ b/scripts/restore @@ -64,7 +64,6 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= # ADD SWAP IF NEEDED #================================================= -ynh_print_info "Adding swap..." total_memory=$(ynh_check_ram) total_swap=$(ynh_check_ram --only_swap) @@ -81,8 +80,8 @@ if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then swap_needed=$((2048 - $total_swap)) fi -ynh_print_info "Adding $swap_needed to swap..." -ynh_add_swap $swap_needed +ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 +ynh_add_swap --size=$swap_needed #================================================= # RESTORE CONF FILES diff --git a/scripts/upgrade b/scripts/upgrade index b40f510..90e7165 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -182,7 +182,6 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= # ADD SWAP IF NEEDED #================================================= -ynh_print_info "Adding swap..." total_memory=$(ynh_check_ram) total_swap=$(ynh_check_ram --only_swap) @@ -199,8 +198,8 @@ if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then swap_needed=$((2048 - $total_swap)) fi -ynh_print_info "Adding $swap_needed to swap..." -ynh_add_swap $swap_needed +ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 +ynh_add_swap --size=$swap_needed #================================================= # PRECONFIGURE GITLAB