blob: d6d7e2e9ff15bc825bcf1a831763c4e62ff20478 (
plain)
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
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>user-ml</title>
<meta name="Description" content="Script to autogenerate loggers for the user supervision tree." />
<meta name="Description" content="A policy for s6 and s6-rc" />
<meta name="Keywords" content="goetia longrun-make s6-rc logger log user supervision tree" />
</head>
<header>
<p>
<a href="//0x53.net/software/goetia/goetia-base">goetia-base</a>
<br />
<a href="//0x53.net/software/goetia">goetia</a>
<br />
<a href="//0x53.net/software">Software</a>
<br />
<a href="//0x53.net">0x53.net</a>
</p>
</header>
<body>
<h1>The user-ml program</h1>
<p>
user-ml automatically creates logging service
<a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html#source">source directories</a>
for longrun services of the
<a href="//0x53.net/software/goetia/confdir.html#user">user configuration directory</a>.
To create the logging service source directories,
user-ml uses
<a href="./longrun-make.html">longrun-make</a> internally.
</p>
<h2>Interface</h2>
<pre> user-ml</pre>
<ul>
<li>
user-ml takes no arguments.
</li>
<li>
It reads the <code>USER</code> environment variable,
if it is empty it exits 100.
</li>
<li>
It reads the <code>USERTREE</code> environment variable,
if it is empty it exits 100.
</li>
<li>
It reads the <code>HOME</code> environment variable,
if it is empty it exits 100.
</li>
<li>
It deletes the <code>${USERTREE}/src/generated-logger</code> subdirectory
of the <a href="//0x53.net/software/goetia/confdir.html#user">user configuration subdirectory</a>.
</li>
<li>
It scans the <code>${USERTREE}/src</code> subdirectory
of the <a href="//0x53.net/software/goetia/confdir.html#user">user configuration subdirectory</a>
for longrun services.
</li>
<li>
It checks for each longrun it detects,
whether its source directory contains a file <code>no-ml</code>.
If this file exits, this longrun is skipped in the subsequent logger generation.
</li>
<li>
It generates a logging service source directory
<code>${USERTREE}/src/generated-logger/<var>@longrun@</var>-log</code>
in parallel for each longrun <code><var>@longrun@</var>-srv</code> it found
in the <a href="//0x53.net/software/goetia/confdir.html#user">user configuration subdirectory</a>.
</li>
</ul>
<h2>Exit codes</h2>
<ul>
<li>
100 if a critical environment variable is missing.
</li>
<li>
Since user-ml is an
<a href="https://skarnet.org/software/execline/">execline</a>
script, it exits with an approximation
of employed program that failed.
</li>
<li>
user-ml mostly uses
<a href="https://skarnet.org/software/execline/">execline</a>
and
<a href="https://skarnet.org/software/s6/">s6</a>
software, the exit behaviour of which can be looked up on
their respective pages.
</li>
<li>
See also:
<a href="https://skarnet.org/software/execline/exitcodes.html">execline exit code handling</a>.
</li>
</ul>
<h2>Options</h2>
<ul>
<li>
There are no options to user-ml.
</li>
</ul>
</body>
</html>
|