Forum OpenACS Q&A: Re: Daemontools question

Collapse
2: Re: Daemontools question (response to 1)
Posted by Tom Jackson on

No, daemontools supervise will continue to try to restart the server. However, you might put in your run file a sleep:

#!/bin/bash

sleep 4

...

Daemontools also has a feature I have found missing with inittab. What to do when a config file has a syntax error, or any error is thrown while reading the config file. Use readproctitle:


# ps axww|grep readproctitle

This will display the errors which are being generated but don't yet have a place to go, so never show up.

Also use the script 'svgroup' to allow your development group control the service. This script is now a part of OpenACS, but I'll repeat it here:

[tom@mimer tcl]$ cat /usr/sbin/svgroup
#! /bin/sh
if test $# -lt 2 ; then
    echo svgroup groupname directories ... >&2
    echo for example: >&2
    echo svgroup wheel /service/\* >&2
    exit 2
fi
g="$1" ; shift
for i in $* ; do
    chgrp $g $i/supervise/control
    chmod g+w $i/supervise/control
    chgrp $g $i/supervise/ok
    chmod g+w $i/supervise/ok
    # just in case
    chgrp $g $i/supervise/status
    chmod g+r $i/supervise/status
    chgrp $g $i/supervise
    chmod g+x $i/supervise
done


Then as root run 'svgroup web-group /service/serviceX'