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