> Carlo Manuali (Wed 17.0500-09:02):
> 
> I've installed the qmail daemontools, but the svsscan don't work propertly.
> I've followed the instruction at http://cr.yp.to/daemontools/svscan.html
> but what i have to do after insert the line csh -cf 'svscan /service &' in

the '&' has to be at the end of the line by itself, because this command is
supposed to be backgrounded.

to have a service monitored by svscan you will have to decide if multilog
or some other logger should take care of logging messages from this
service.  lets assume you use some standard logging program which loggs
everything coming thru stdin.  then set up the follwing:

the directory where the service will work and live, lets say /local/serv.

==> mkdir /local/serv; chmod g+s,a+t /local/serv; mkdir /local/serv/log

the sticky bit on the directory will make svscan start another supervisor
for logging activities of serv.  next you need serv/run and serv/log/run
looking somewhat like:

==> #!/bin/sh
    # /local/serv/run
    exec setuidgid serverid /local/bin/serv -o -ption

    #!/bin/sh
    # /local/serv/log/run
    exec setuidgid loggerid /local/bin/multilog -n3 -s33000 ./

these scripts =must= be named run, because supervise uses this name to
start the service.  you do not have to use setuidgid to set the id (and
hence the permissions) of your service, but the amount of code running with
root privileges must be as small as possible, which is called security.  in
addition to setting the id of your service you might think of setting
resource limits with softlimit.  it is very important to set the ownership
and permissions of the directory and the files therein.  the multilog
loggerid must have write permissions for the files in serv/log/*, or else
you will hear the "multilog rhythm(tm)" from the hard disk, which indicates
that it can't write.  same goes for your service.

if all is well and setup to please the daemons of pc, you can again do

==> ln -s /local/serv /service

with "svscan /service &" or some such in your /etc/rc.  see to it that the
programs mentioned can be found by including their binaries directory in
the default path.

> I've created a simbolic link from /service/boot to /var/qmail/boot wher is
> rc script but doesn't work.

easy now.  why don't you send us the contents of your rc-file?
nevertheless, there =must= be a certain file by the name of ``run'' in the
service directory, the name is hard-coded into supervise.c


-- 
clemens                                              [EMAIL PROTECTED]
        do                                              D4685B884894C483
        gpg recv-key 0x9
        echo `gpg list-key 0x9 | cat -tv` | \
        gpg encrypt `gpg list-key 0x9 | 822address` | \
        mail -s your-key `gpg list-key 0x9 | 822address`
        wait
        [encrypted] return mail.
        no return mail within a week, you in trouble.
        no return mail after a month, i in trouble.
        please check
        done

Reply via email to