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 [where]
where is a socket location or a host/port. By default, it'll listen in
~/.jesus/daemon.sock. Note that it will not daemonise on its own - you'll have
to take care of that for now. I run it via upstart.
user@host:~$ jesus listen
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.