From b15e6f0afebb2b4be0e943cced29a575c80a9952 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 13 Oct 2019 18:52:07 +0200 Subject: [PATCH] [fix] install, restore, upgrade - npm does not install globally anymore - restore and upgrade make sure that nodejs in installed --- scripts/install | 4 ++-- scripts/restore | 4 ++++ scripts/upgrade | 9 ++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 9f43ea2..c4f2d02 100755 --- a/scripts/install +++ b/scripts/install @@ -79,7 +79,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # Use Helper instead of package from the repo -ynh_install_nodejs 10 +ynh_install_nodejs $nodejs_version #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -101,7 +101,7 @@ ynh_script_progression --message="Installing node-red..." --time --weight=2 pushd $final_path ynh_use_nodejs -npm install --production -g +npm install --production popd #================================================= diff --git a/scripts/restore b/scripts/restore index c229512..72d21e7 100755 --- a/scripts/restore +++ b/scripts/restore @@ -81,6 +81,10 @@ ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # SPECIFIC RESTORATION #================================================= +# INSTALL NODEJS +#================================================= + +ynh_install_nodejs $nodejs_version #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 17074be..383b9fd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -96,6 +96,13 @@ ynh_script_progression --message="Stopping a systemd service..." --time --weight ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +#================================================= +# INSTALL NODEJS +#================================================= +# Use Helper instead of package from the repo + +ynh_install_nodejs $nodejs_version + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -115,7 +122,7 @@ ynh_script_progression --message="Installing node-red..." --time --weight=2 pushd $final_path ynh_use_nodejs -npm install --production -g +npm install --production popd #=================================================