You are here
Cem Incecinar - Mon, 2012/10/15 - 14:34
Hello,
I dont know am i asking a naive question or not but i was trying to find out something in NodeJS appliance. "Includes custom nodejs initscript for running node app as daemon" as stated but cant figure it out where it is, how can i found the initscript and documentation about it to learn how i can use it in appliance.
Thank you
Forum:
Tags:
Github:Gist has a Daemonizer
https://gist.github.com/1065350 promises to daemonize. I get an error, however. I don't if it's the script or my total ignorance.
Its included already
Appliance says its included already so im just looking where it is
http://www.turnkeylinux.org/nodejs
Check Features
Do any of the links on the 'Control Panel' page help?
Please note I have not used the NodeJS appliance so it is a case of blind leading the blind!
Perhaps there are links to relevant references on the 'Control Panel' page?
Otherwise if the daemon is already started you could check using a command like 'ps aux|grep node' and see what that returns. If it is running (and includes node in it's name) it should show up and hopefully with a path. You could also try something like 'ps aux|grep tklweb' (as the appliance page states that Node is installed to /opt/tklweb-cp so perhaps that's what it is called?)
Another thought is that AFAIK daemons require an init script (which should be found in /etc/init.d) and often (but not always) daemons have their settings defined in /etc/defaults. These could be places to look for the init script.
If you can find the script but it still means nothing to you, feel free to post it and I am willing to try to help you decode it (although no promises on whether or not I will be able to be of any help).
Whelp
I've had to start my node site (in opt) with npm start /path/to/site & in rc.local for the timebeing. Looking for a better way.
Sorry for the terribly late reply...
The initscript that's included in all nodejs based appliances is located at: /etc/init.d/nodejs
It sources /etc/default/nodejs looking for NODEJS_EXEC, which is then used to start the app.
For example, in the nodejs appliance:
BTW, the etherpad appliance is configured with NODEJS_EXEC=/opt/etherpad/bin/safeRun.sh
Hope the above helps...
Thank you for reply
Thank you for reply even its late. That will be more usefull.
Add new comment