From 74afe7d2e893377216f9118e035a717ce1dfa384 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:39:58 +0100 Subject: [PATCH] Update restore --- scripts/restore | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/scripts/restore b/scripts/restore index 994dbb2..e75f01c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,21 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=10 - -# Define and install dependencies -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version - -# Reinstall Yarn -ynh_npm install --global yarn - -# Reinstall vite -ynh_npm install --global vite - - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -32,10 +17,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -pushd $install_dir -ynh_use_nodejs -popd - chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -45,6 +26,10 @@ chown -R $app:$app "$install_dir" #================================================= ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 + +# Define and reinstall dependencies +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version + ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"