node-red / linux-installers

Node-RED install scripts for various flavours of Linux
Apache License 2.0
94 stars 63 forks source link

option --nodered-user is broken #44

Closed bs-eng closed 6 months ago

bs-eng commented 7 months ago

Hi! Using the script on a Debian system executing it as root and specifying the user to run as with option --nodered-user=xxxxx leads to the following error and stop of script (at least I cannot see whether or not the script got interrupted by the error or it actually finished the installation). During the installation process the path to the settings file was given as:

/home/nodered/.node-red/settings.js

Resulting error:

Settings file written to /home/nodered/.node-red/settings.js
chown: cannot access '/root/.node-red/settings.js': No such file or directory

To me it seems the user input is not used in all necessary places, like the chown operation. Cheers

Edit: from checking the currently running processes I can see that node-red is not running at the end of the script.

dceejay commented 6 months ago

At the end of the script it does not automatically start Node-RED - you need to do that using node-red-start or the command to start it as a service. (but yes I can see an issue with some of the ownership commands that cause that error message)