about summary refs log tree commit diff
path: root/kitd.8
blob: 54a9fa30813ee95c10780116cfafb9263d062cf7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
.Dd October 10, 2023
.Dt KITD 8
.Os
.
.Sh NAME
.Nm kitd
.Nd process supervisor
.
.Sh SYNOPSIS
.Nm
.Op Fl d
.Op Fl c Ar cooloff
.Op Fl m Ar maximum
.Op Fl n Ar name
.Op Fl t Ar restart
.Ar command ...
.
.Sh DESCRIPTION
The
.Nm
daemon supervises
a child process,
redirecting its standard output
and standard error to
.Xr syslog 3 .
When the child process exits,
it is automatically restarted
using exponential backoff.
.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl c Ar cooloff
The interval for which
the child process must live
before the restart interval
is reset to its initial value.
.Pp
The interval may have a suffix of
.Sy s , m , h
or
.Sy d
for seconds, minutes, hours or days,
respectively.
Otherwise,
the interval is in milliseconds.
.Pp
The default cooloff interval is
.Sy 15m .
.It Fl d
Do not daemonize.
Log to standard error
as well as
.Xr syslog 3 .
.It Fl m Ar maximum
The maximum interval between restarts.
.Pp
The interval is interpreted as with
.Fl c .
The default maximum interval is
.Sy 1h .
.It Fl n Ar name
Set the name of the process
and the logging prefix.
The default is
the last path component of
.Ar command .
.It Fl t Ar restart
The initial interval between restarts.
This interval is doubled
each time the child process
is restarted.
.Pp
The interval is interpreted as with
.Fl c .
The default restart interval is
.Sy 1s .
.El
.
.Pp
.Nm
responds to the following signals:
.Bl -tag -width Ds
.It Dv SIGTERM | Dv SIGINT
The signal is forwarded to
the child process.
.Nm
exits.
.It Dv SIGINFO
The status of the child process
is logged.
.It Dv SIGHUP | Dv SIGUSR1 | Dv SIGUSR2
The signal is forwarded to
the child process.
.El
.
.Sh EXAMPLES
To set up supervisors for
.Xr pounce 1 :
.Bd -literal
# ln -s kitd /etc/rc.d/pounce_tilde
# ln -s kitd /etc/rc.d/pounce_libera
# rcctl enable pounce_tilde pounce_libera
# rcctl set pounce_tilde user _pounce
# rcctl set pounce_tilde flags pounce -h irc.tilde.chat defaults.conf
# rcctl set pounce_libera user _pounce
# rcctl set pounce_libera flags pounce -h irc.libera.chat defaults.conf
# rcctl start pounce_tilde pounce_libera
.Ed
.
.Sh AUTHORS
.An June McEnroe Aq Mt june@causal.agency