I know there is a program called upstart that can make it easy to make small daemons. I can't get this program to configure on CentOS. I get all sort of errors concerning pkg-congfig, libnih, and dbus.
I am working on a node.ja application and this is a pain to start and stop all the time, so I want to create a deamon for this which makes it easy to start and stop.
Update 1
I will give a small example of what i need for this project, I hope someone can help with this.
To start the node.js application I have to type in SSH:
# node /path-to-file/filename.js
Now when I execute this the terminal freezez, i have to press CTRL + Z (pc) to get input back.
Now when i changed something in the file I have to reload it again
I need to:
# killall -9 node
This kills all the node applications that are running
Next i have to start the script again
# node /path-to-file/filename.js
I want to just type
# myapp restart
And everything is done. This type of setup would save me lots of time
Update 2
I found a program called monit. This works nice, and automatically starts the application in case of a crash, which is good. It also has a nice web interface which is also handy.
I can type
# monit myapp start(start/stop/restart)
This works fine. There is only one downside, and this is a major downside. When i start the myapp application, it does not display the compile errors node.js throws. So when it fails to start I will not know what the reason is. I have to type the whole '# node /path-to-file/filename.js' again to check the error.
