Skip to content

Instantly share code, notes, and snippets.

@natcl
Last active April 1, 2018 07:22
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save natcl/e4cfb0b5868fea770580 to your computer and use it in GitHub Desktop.
Save natcl/e4cfb0b5868fea770580 to your computer and use it in GitHub Desktop.
Node-red startup file for Synology (/etc/init)
# only start this service after the httpd user process has started
#start on syno.network.ready
start on runlevel 2
# stop the service gracefully if the runlevel changes to 'reboot'
stop on runlevel [06]
# run the scripts as the 'admin' user. Running as root (the default) is a bad idea.
setuid admin
# exec the process. Use fully formed path names so that there is no reliance on $PATH
# the 'www' file is a node.js script which starts the foobar application.
exec /usr/bin/node /volume1/Partage/node_modules/node-red/red.js -v --userDir /var/services/homes/admin/.node-red --settings /volume1/Partage/node_modules/node-red/settings.js
@luisgcu
Copy link

luisgcu commented Sep 3, 2017

hello ,
I cant find this path on my synology? --> /usr/bin/node /volume1/Partage/node_modules/node-red/red.js
node doesn't exist on usr/bin/
I can't find this path either --> node_modules/node-red/red.js
What I got is this --> /volume2/homes/luisgcu/.node-red/node_modules
No red.js file is found in that previous path
What I missing?
I can start stop node-red manually without any issue, what I need is to start it automatically.

@natcl
Copy link
Author

natcl commented Sep 7, 2017

You need to change the path according to your setup.
In your case node-red would probably be in /volume2/homes/luisgcu/.node-red/node_modules/node-red/red.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment