1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/glitchsoc_ynh.git synced 2024-09-03 19:15:59 +02:00
This commit is contained in:
Tagada 2024-02-22 21:05:21 +01:00 committed by Félix Piédallu
parent dcf75ad499
commit f0072bcedb
3 changed files with 12 additions and 12 deletions

View file

@ -64,8 +64,8 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Installing Ruby and NodeJS..." --weight=1 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_ruby --RUBY_VERSION=$RUBY_VERSION
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --NODEJS_VERSION=$NODEJS_VERSION
#================================================= #=================================================
# ADD SWAP IF NEEDED # ADD SWAP IF NEEDED
@ -75,9 +75,9 @@ ynh_script_progression --message="Adding swap if needed..." --weight=1
total_memory=$(ynh_get_ram --total) total_memory=$(ynh_get_ram --total)
swap_needed=0 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 # Need a minimum of 2.5Go of memory
swap_needed=$(($memory_needed - $total_memory)) swap_needed=$(($MEMORY_NEEDED - $total_memory))
fi fi
ynh_script_progression --message="Adding $swap_needed Mo to swap..." ynh_script_progression --message="Adding $swap_needed Mo to swap..."

View file

@ -41,9 +41,9 @@ ynh_script_progression --message="Adding swap if needed..." --weight=1
total_memory=$(ynh_get_ram --total) total_memory=$(ynh_get_ram --total)
swap_needed=0 swap_needed=0
if [ $total_memory -lt $memory_needed ]; then if [ $total_memory -lt $MEMORY_NEEDED ]; then
# Need a minimum of 8Go of memory # Need a minimum of 8Go of memory
swap_needed=$(($memory_needed - $total_memory)) swap_needed=$(($MEMORY_NEEDED - $total_memory))
fi fi
ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 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_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_ruby --RUBY_VERSION=$RUBY_VERSION
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --NODEJS_VERSION=$NODEJS_VERSION
ynh_script_progression --message="Installing Yarn dependencies..." --weight=10 ynh_script_progression --message="Installing Yarn dependencies..." --weight=10

View file

@ -141,9 +141,9 @@ ynh_script_progression --message="Adding swap if needed..." --weight=1
total_memory=$(ynh_get_ram --total) total_memory=$(ynh_get_ram --total)
swap_needed=0 swap_needed=0
if [ $total_memory -lt $memory_needed ]; then if [ $total_memory -lt $MEMORY_NEEDED ]; then
# Need a minimum of 8Go of memory # Need a minimum of 8Go of memory
swap_needed=$(($memory_needed - $total_memory)) swap_needed=$(($MEMORY_NEEDED - $total_memory))
fi fi
ynh_script_progression --message="Adding $swap_needed Mo to swap..." 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_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_ruby --RUBY_VERSION=$RUBY_VERSION
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_exec_warn_less ynh_install_nodejs --NODEJS_VERSION=$NODEJS_VERSION
#================================================= #=================================================
# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...)