From 92d0de9ac60659bf5d1f75b054719746e09cf2d1 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 19 Apr 2020 14:51:57 +0200 Subject: [PATCH] [fix] node and npm paths --- conf/systemd.service | 2 +- scripts/install | 10 +++++----- scripts/upgrade | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 2fa01a6..1b56edb 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ User=ztncui Group=ztncui Environment="__YNH_NODE_LOAD_PATH__" WorkingDirectory=__FINAL_PATH__/src/ -ExecStart=__YNH_NODE__/npm start +ExecStart=__YNH_NPM__ start [Install] WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index 49bbdf3..0ad2a60 100644 --- a/scripts/install +++ b/scripts/install @@ -156,10 +156,10 @@ ynh_script_progression --message="Performing Node app installation..." --time -- chown -R $app: $final_path pushd $final_path/src - ynh_exec_as $app $ynh_npm --loglevel=error install node-gyp - ynh_exec_as $app $ynh_npm --loglevel=error install - ynh_exec_as $app $ynh_npm --loglevel=error install argon2-cli - ynh_exec_as $app $ynh_npm --loglevel=error audit fix + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm --loglevel=error install node-gyp + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm --loglevel=error install + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm --loglevel=error install argon2-cli + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm --loglevel=error audit fix popd #================================================= @@ -212,7 +212,7 @@ ynh_script_progression --message="Configuring a systemd service..." --time --wei ### - And the section "SETUP SYSTEMD" in the upgrade script # Create a dedicated systemd config -ynh_add_systemd_config_vars --others_var="ynh_node_load_PATH ynh_node" +ynh_add_systemd_config_vars --others_var="ynh_node_load_PATH ynh_npm" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index fcbfa99..d6c2e01 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -136,10 +136,10 @@ ynh_script_progression --message="Performing Node app installation..." --time -- chown -R $app: $final_path pushd $final_path/src - ynh_exec_as $app $ynh_npm --loglevel=error install node-gyp - ynh_exec_as $app $ynh_npm --loglevel=error install - ynh_exec_as $app $ynh_npm --loglevel=error install argon2-cli - ynh_exec_as $app $ynh_npm --loglevel=error audit fix + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm --loglevel=error install node-gyp + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm --loglevel=error install + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm --loglevel=error install argon2-cli + ynh_exec_as $app $ynh_node_load_PATH $ynh_npm --loglevel=error audit fix popd #================================================= @@ -184,7 +184,7 @@ ynh_use_logrotate --non-append ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 # Create a dedicated systemd config -ynh_add_systemd_config_vars --others_var="ynh_node_load_PATH ynh_node" +ynh_add_systemd_config_vars --others_var="ynh_node_load_PATH ynh_npm" #================================================= # GENERIC FINALIZATION