Resurrect processes if they die.
Jesus is a simple-ish process management tool. It's designed to be very light, while still providing functions enough to be automated if necessary. To that end, it only runs a single process to monitor all your stuff. It can be exposed via a unix socket (default) or an actual network interface for automation.
Available via npm:
$ npm install jesus
Or via git:
$ git clone git://github.com/deoxxa/jesus.git node_modules/jesus
Also see example.js.
To start a monitoring server
user@host:~$ jesus listen [log]
log is a file location for logging. If not supplied, logging will go to
stdout by default. Note that
listen does not daemonise the process. You should
daemon in place of
listen to do that.
user@host:~$ jesus listen
user@host:~$ jesus listen ~/.jesus/jesus.log
user@host:~$ jesus daemon ~/.jesus/jesus.log
To start a process
user@host:~$ jesus start <id> [argument1 [argument2 ...]]
id is a string. It tells Jesus how to identify your process to you. The
argument bits are basically just the rest of your command.
user@host:~$ jesus start nc.1 nc -l -p 8001
To stop a process
user@host:~$ jesus stop <id>
Pretty simple. Does what it says on the tin.
To restart a process
user@host:~$ jesus restart <id>
stop for the most part. Self-explanatory.
To list processes
user@host:~$ jesus list
This'll give you a nice list of processes that are running, and some limited statistics.
To restart all processes
user@host:~$ jesus restartall
Restarts everything that's running.
3-clause BSD. A copy is included with the source.