diff --git a/scripts/install b/scripts/install index 27fac06..a3fca04 100644 --- a/scripts/install +++ b/scripts/install @@ -110,7 +110,11 @@ ynh_system_user_create $app #================================================= # Create a dedicated systemd config +ynh_use_nodejs ynh_add_systemd_config +ynh_replace_string "__NODEJS__" "$nodejs_use_version" "/etc/systemd/system/$app.service" +ynh_replace_string "__ENV_PATH__" "$PATH" "/etc/systemd/system/$app.service" +ynh_replace_string "__NODE__" "$nodejs_path" "/etc/systemd/system/$app.service" #================================================= # MODIFY A CONFIG FILE @@ -121,9 +125,8 @@ cp -a ../conf/config.js $config_path #================================================= # INSTALL THE LOUNGE #================================================= -ln -s /opt/node_n/bin/node /usr/bin/node/ -ynh_use_nodejs -npm -g install $final_path --unsafe-perm + +npm install $final_path --unsafe-perm # Install webpack #npm -g install webpack