diff --git a/scripts/install b/scripts/install index 9868987..eeda0f3 100755 --- a/scripts/install +++ b/scripts/install @@ -8,7 +8,6 @@ source _common.sh source ynh_install_go -source ynh_add_swap source /usr/share/yunohost/helpers #================================================= @@ -61,27 +60,6 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=language --value=$language_key -#================================================= -# ADD SWAP IF NEEDED -#================================================= - -total_memory=$(ynh_get_ram --total) -swap_needed=0 - -ynh_script_progression --message="The system currently has $(ynh_get_ram --total) Mo of RAM..." - -# Need at least 2Go of RAM to build and run -if [ $total_memory -lt 2048 ]; then - swap_needed=$((2048 - total_memory)) -fi - -if [ $swap_needed -gt 0 ]; then - ynh_script_progression --message="Adding $swap_needed Mo to swap..." - ynh_add_swap --size=$swap_needed -fi - -ynh_script_progression --message="The system now has $(ynh_get_ram --total) Mo of RAM..." - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -171,6 +149,7 @@ pushd "$final_path" # Setup node environment export NODE_OPTIONS=--max_old_space_size=1024 # Build server from source + ynh_secure_remove --file="$final_path/build" make all install DESTDIR=$final_path/build 2>&1 ynh_secure_remove --file="$final_path/go" popd diff --git a/scripts/remove b/scripts/remove index 926a009..b4c79e2 100755 --- a/scripts/remove +++ b/scripts/remove @@ -105,13 +105,6 @@ then ynh_exec_warn_less yunohost firewall disallow TCP $port fi -#================================================= -# REMOVE SWAP IF NEEDED -#================================================= -ynh_script_progression --message="Removing swap if needed..." - -ynh_del_swap - #================================================= # SPECIFIC REMOVE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c660269..639a28d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -8,7 +8,6 @@ source _common.sh source ynh_install_go -source ynh_add_swap source /usr/share/yunohost/helpers #================================================= @@ -119,6 +118,8 @@ pushd "$final_path" export GOBIN=$GOPATH/bin # Setup tensorflow library ./scripts/dist/install-tensorflow.sh + # Setup node environment + export NODE_OPTIONS=--max_old_space_size=1024 # Build server from source ynh_secure_remove --file="$final_path/build" make all install DESTDIR=$final_path/build 2>&1