diff --git a/scripts/install b/scripts/install index 10d8064..666e770 100644 --- a/scripts/install +++ b/scripts/install @@ -64,8 +64,8 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Installing Ruby and NodeJS..." --weight=1 -ynh_exec_warn_less ynh_install_ruby --ruby_version=$ruby_version -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version +ynh_exec_warn_less ynh_install_ruby --RUBY_VERSION=$RUBY_VERSION +ynh_exec_warn_less ynh_install_nodejs --NODEJS_VERSION=$NODEJS_VERSION #================================================= # ADD SWAP IF NEEDED @@ -75,9 +75,9 @@ ynh_script_progression --message="Adding swap if needed..." --weight=1 total_memory=$(ynh_get_ram --total) swap_needed=0 -if [ $total_memory -lt $memory_needed ]; then +if [ $total_memory -lt $MEMORY_NEEDED ]; then # Need a minimum of 2.5Go of memory - swap_needed=$(($memory_needed - $total_memory)) + swap_needed=$(($MEMORY_NEEDED - $total_memory)) fi ynh_script_progression --message="Adding $swap_needed Mo to swap..." diff --git a/scripts/restore b/scripts/restore index 159921b..2e05f73 100644 --- a/scripts/restore +++ b/scripts/restore @@ -41,9 +41,9 @@ ynh_script_progression --message="Adding swap if needed..." --weight=1 total_memory=$(ynh_get_ram --total) swap_needed=0 -if [ $total_memory -lt $memory_needed ]; then +if [ $total_memory -lt $MEMORY_NEEDED ]; then # Need a minimum of 8Go of memory - swap_needed=$(($memory_needed - $total_memory)) + swap_needed=$(($MEMORY_NEEDED - $total_memory)) fi ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 @@ -54,8 +54,8 @@ ynh_add_swap --size=$swap_needed #================================================= ynh_script_progression --message="Reinstalling Ruby and NodeJS..." --weight=1 -ynh_exec_warn_less ynh_install_ruby --ruby_version=$ruby_version -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version +ynh_exec_warn_less ynh_install_ruby --RUBY_VERSION=$RUBY_VERSION +ynh_exec_warn_less ynh_install_nodejs --NODEJS_VERSION=$NODEJS_VERSION ynh_script_progression --message="Installing Yarn dependencies..." --weight=10 diff --git a/scripts/upgrade b/scripts/upgrade index 9252fad..3823651 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -141,9 +141,9 @@ ynh_script_progression --message="Adding swap if needed..." --weight=1 total_memory=$(ynh_get_ram --total) swap_needed=0 -if [ $total_memory -lt $memory_needed ]; then +if [ $total_memory -lt $MEMORY_NEEDED ]; then # Need a minimum of 8Go of memory - swap_needed=$(($memory_needed - $total_memory)) + swap_needed=$(($MEMORY_NEEDED - $total_memory)) fi ynh_script_progression --message="Adding $swap_needed Mo to swap..." @@ -154,8 +154,8 @@ ynh_add_swap --size=$swap_needed #================================================= ynh_script_progression --message="Upgrading Ruby and NodeJS..." --weight=1 -ynh_exec_warn_less ynh_install_ruby --ruby_version=$ruby_version -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version +ynh_exec_warn_less ynh_install_ruby --RUBY_VERSION=$RUBY_VERSION +ynh_exec_warn_less ynh_install_nodejs --NODEJS_VERSION=$NODEJS_VERSION #================================================= # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...)