

Show HN: Gabriel, a zero-configuration watchdog process - udoprog
http://toolchain.eu/project/gabriel

======
simonw
At first glance, this looks like the process watchdog I've been waiting for.
Very neat approach to configuration, smart defaults etc. I especially like the
idea of automatically redirecting stdout and stderr to out and err files in
the working directory.

~~~
udoprog
Thanks. I've been looking for something like this for a long time, and I've
implemented around 3 different solutions for doing this (pure bash, python, c)
but none has been as instantly useful as this.

I wanted something like DJBs daemontools but with less configuration and
setup. And I've seen nohup, daemonize etc. But these loose ownership of the
running process, and you eventually have to do hacks if you want to do stuff
like auto restart or signal degradation.

------
sigil
What benefits does this have over daemontools?
<http://cr.yp.to/daemontools.html>

~~~
udoprog
Setting up a service with gabriel is as simple as:

    
    
        gabriel --cwd /var/run/service -- /bin/service
    

Killing the service:

    
    
        gabriel --cwd /var/run/service --kill
    

The main difference between this and daemontools is that this is more ad-hoc
and in place. If cwd isn't specified, the current directory will be used to
setup the necessary set of files to start/stop/restart a persistent service.

It's also possible to specify a kill pattern which governs how the process
should be forced to shutdown (similar to start-stop-daemon in gentoo):

    
    
        gabriel --cwd /var/run/service --kill-pattern TERM:10:KILL:10 -- /bin/service
    

Send TERM, wait 10 seconds, send KILL, wait 10 seconds. Shutdown no matter
what.

So Gabriel does not require and explicit structure, much is left to be handled
by sensible defaults.

------
chopsueyar
What's in a name?

<http://en.wikipedia.org/wiki/Gabriel>

------
Osiris
Interesting, but you may want to pick a different font for you text; I can
barely read it.

