Re: Daemontools wrapper packages
On Thu, Feb 22, 2001 at 06:00:38PM +0100, Ondrej Sury wrote:
> Klaus Reimer <kay@debian.org> writes:
> > Hi,
> >
> > We have discussed some weeks ago how to write daemontools wrapper packages to
> > have an easy possibility to setup init.d-style services like proftpd under
> > daemontools. I'm currently trying to create such a package, but have two
> > problems. First let me explain, how I am doing it:
[...]
>
> My advice is:
>
> 0. don't DEPEND on daemontools, just let <package> use it if available.
>
Right. log2mail in incoming is allready doing this.
> 1. Keep /etc/init.d/<package> in place.
>
yep.
> 2. Either symlink /etc/<package>/ into /var/lib/svscan/<package> or create
> /var/lib/svscan/<package>/{run,log/run} (maybe problem with current policy?)
>
I use symlink /etc/<package>/service -> /service/<package> , done manually.
> 3. /etc/init.d/daemontools package should start before any init.d scripts
> using it and it should put down file in all directories under /var/lib/svscan/
>
/etc/init.d/daemontools should not exist, it is recommend starting svscan
from inittab. No need for down files, see below.
> 4. If init.d scripts detects daemontools it switches to DT mode:
> a) start will do ( cd /var/lib/svscan; rm <package>/down; svc -u <package> )
> b) restart will do ( cd /var/lib/svscan; svc -t <package> )
> c) stop will do ( cd /var/lib/svscan; touch <package>/down; svc -td <package>; )
>
init.d script should just test -L /service/<package> and exit 0 if true.
Use svc(8) /service/<package> to control the service.
> 5. make daemontools debian package should provide some support scripts
> which will simplify changes listed in (4.)
>
No need for that.
Regards, Gerrit.
--
pape@innominate.com
innominate AG
the linux architects
tel: +49.30.308806-0 fax: -77 http://www.innominate.com
Reply to: