:: Re: [DNG] Cannot boot my server.
Página Principal
Delete this message
Reply to this message
Autor: Steve Litt
Data:  
Para: dng
Assunto: Re: [DNG] Cannot boot my server.
Hendrik Boom said on Mon, 18 Dec 2023 18:59:51 -0500

>It seems to want to be supervised by runit, which I've heard a lot
>about on this mailing list.
>I've installed the 'daemon' and 'runit' packages that tie
>.../init.c/tinydns claims to need.
>(why wasn;t that a dependency of the tinydns package?).
>But I do not know how to get it to run, or how to even te;; whether
>it's running and my problems are elsewhere.
>
>I don't know enough about runit to know where to look.
>
>Steve, I think you're the foremost runit proselytizer on this list.
>Care to tell me what to do or look for or read next?
>
>-- hendrik


Yes. Runit's runsvdir program loops through all subdirectories of the
runit root directory, which djb set to /service, but runit sets to
/var/service. Each subdirectory supervises a daemon. What you typically
do is create the directory elsewhere (/etc/sv on Void Linux, for
instance), and then symlink it to /var/service . Inside the directory
is a shellscript called "run" that sets a few values and then exec's to
the desired daemon RUNNING IN THE FOREGROUND. Here's my run script for
dovecot:

==========================================
#!/bin/sh
exec 2>&1
install -d -m 0755 -o root -g root /var/run/dovecot
exec dovecot -F
==========================================

There can also be a shellscript called "finish" to run when your server
goes down.

If things go wrong, your daemon gets in a defective state. When that
happens, simply remove the entire supervise directory from the daemon's
directory, and try again.

The go-to documentation is that of the original author at
http://smarden.org/runit/ .

I documented runit's predecessor, daemontools, which is just like the
process supervisor part of runit at
http://troubleshooters.com/linux/djbdns/daemontools_intro.htm .

HTH,

SteveT

Steve Litt

Autumn 2023 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21