Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How should I daemon-ize and "watchdog" it, auto-start on reboot, redirect console output to a log file?

share|improve this question
add comment

2 Answers 2

up vote 8 down vote accepted

Used forever as a daemon tool in past projects. It'll automatically restart your node.js scripts if they crash. Also, it can start and manage multiple node processes and maintain a log file for each of them individually. However it doesn't start the scripts on reboot.

Read a couple of times that people were using Upstart to make the initial launch of forever, but i've never used it myself, never had the need to start on boot.

share|improve this answer
    
Thanks Philipp! –  Ivan Krechetov Mar 30 '12 at 6:52
add comment

This is the one of the job of initd or upstart. May be you can use inetd too if it is ok to start it on demand.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.