From e43caa75d72478c5b4b5a7dd8d4e44e7263e2b90 Mon Sep 17 00:00:00 2001 From: DDATAA <45762540+Ddataa@users.noreply.github.com> Date: Thu, 15 Dec 2022 13:26:15 +0000 Subject: [PATCH] Update restore fix missing nodejs --- scripts/restore | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/restore b/scripts/restore index 9b2f80a..da07214 100755 --- a/scripts/restore +++ b/scripts/restore @@ -43,6 +43,13 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -90,13 +97,14 @@ chown -R $app:www-data "$datadir" #================================================= # SPECIFIC RESTORATION #================================================= - #================================================= -# RESTORE THE NGINX CONFIGURATION +# REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." +ynh_script_progression --message="Reinstalling dependencies..." --weight=7 -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +# Define and install dependencies +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version +ynh_use_nodejs #================================================= # RESTORE VARIOUS FILES @@ -104,6 +112,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Restoring various files..." ynh_add_config --template="../conf/settings_base.json" --destination="$final_path/settings_base.json" +chmod 600 "$final_path/settings_base.json" #================================================= # RESTORE SYSTEMD