From 7a3f3d17efa6d7a37db0d4461799a1fc6c83d0aa Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 28 Mar 2024 07:40:12 +0100 Subject: [PATCH] Fix --- scripts/_common.sh | 2 +- scripts/install | 3 --- scripts/restore | 22 +++++++++++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 822a3eb..d82b3be 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -164,7 +164,7 @@ myynh_install_immich() { ynh_add_config --template="immich-server-start.sh" --destination="$install_dir/app/start.sh" chmod +x "$install_dir/app/start.sh" cd "$install_dir/app/" - "$ynh_npm" cache clean --force + ynh_exec_warn_less "$ynh_npm" cache clean --force # Install immich-machine-learning cd "$tmpdir/machine-learning" diff --git a/scripts/install b/scripts/install index 02f6908..f0bf438 100755 --- a/scripts/install +++ b/scripts/install @@ -6,9 +6,6 @@ source _common.sh source /usr/share/yunohost/helpers -# read -p "Continue [Y] ? " reponse -# [[ $reponse == "Y" ]] || ynh_die - #================================================= # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) #================================================= diff --git a/scripts/restore b/scripts/restore index 5758241..0f19c04 100755 --- a/scripts/restore +++ b/scripts/restore @@ -27,6 +27,21 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory chown -R $app:$app "$data_dir" +#================================================= +# INSTALL NODEJS +#================================================= +ynh_script_progression --message="Reinstalling nodejs..." --weight=5 + +ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" + +#================================================= +# CHECK PYTHON VERSION AND COMPILE IF NEEDED +#================================================= +ynh_script_progression --message="Check Python version & compile the required one if needed..." --weight=1 + +py_required_version=$(ynh_app_setting_get --app="$app" --key=python) +myynh_install_python --python="$py_required_version" + #================================================= # RESTORE THE DATABASE #================================================= @@ -36,13 +51,6 @@ db_pwd=$(ynh_app_setting_get --app="$app" --key=psql_pwd) myynh_create_psql_db myynh_restore_psql_db -#================================================= -# INSTALL NODEJS -#================================================= -ynh_script_progression --message="Reinstalling nodejs..." --weight=5 - -ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" - #================================================= # RESTORE SYSTEM CONFIGURATIONS #=================================================