aboutsummaryrefslogtreecommitdiffstats
path: root/doc/s6.conf.html
blob: 9c15615a0904c7dff60614e4e87602c89bdf62a1 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="color-scheme" content="dark light" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="Content-Language" content="en" />
    <title>s6-frontend: the s6.conf configuration file</title>
    <meta name="Description" content="s6-frontend: the s6.conf configuration file" />
    <meta name="Keywords" content="s6.conf s6-frontend configuration file execline variable" />
    <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
  </head>
<body>

<p>
<a href="index.html">s6-frontend</a><br />
<a href="//skarnet.org/software/">Software</a><br />
<a href="//skarnet.org/">skarnet.org</a>
</p>

<h1> The <tt>/etc/s6.conf</tt> configuration file </h1>

<h2 id="goal"> Goal and usage </h2>

<p>
 <tt>/etc/s6.conf</tt> is a configuration file provided by the
distribution, or written by the system administrator, defining various
settings for the <a href="s6.html">s6</a> commands, as well as the default
policies of an s6-based system (i.e. where various directories and files
are located).
</p>

<p>
 For instance, this is what allows the
<a href="s6_process_restart#restart">s6 process restart foobar</a> command to send
<a href="//skarnet.org/software/s6/s6-svc.html">s6-svc -r</a> to the
<em>foobar</em> service without the user needing to type, or even remember,
what the full path to the <em>foobar</em> service directory is.
</p>

<h3> Location </h3>

<p>
The global <tt>/etc/s6.conf</tt> path for the configuration variable can be
overridden by the admin at build time via the <tt>--conffile</tt> configure
option, and by the user at <a href="s6.html">s6</a> run time via the
<tt>S6_CONF</tt> environment variable.
</p>

<h2 id="description"> Description </h2>

<p>
The <tt>/etc/s6.conf</tt> file follows the
<a href="//skarnet.org/software/execline/envfile.html#syntax">envfile syntax</a>:
simple <code>key = value</code> lines, comments permitted.
</p>

<p>
 If a value is left empty, the compiled-in default is used.
</p>

<p>
 The variables that can be set are the following:
</p>

<dl>
<dt> scandir </dt>
<dd> The directory where <a href="//skarnet.org/software/s6/s6-svscan.html">s6-svscan</a>
is running.
The default is <tt>/run/service</tt> (possibly overridden by the <tt>--scandir</tt> build-time configure option to
<a href="//skarnet.org/software/s6-linux-init/">s6-linux-init</a> or to
<a href="//skarnet.org/software/s6-frontend/">s6-frontend</a>). </dd>

<dt> livedir </dt>
<dd> The directory hosting the live service database managed by
<a href="//skarnet.org/software/s6-rc/s6-rc.html">s6-rc</a>.
The default is <tt>/run/s6-rc</tt> (possibly overridden by the <tt>--livedir</tt> build-time configure option to
<a href="//skarnet.org/software/s6-rc/">s6-rc</a> or to
<a href="//skarnet.org/software/s6-frontend/">s6-frontend</a>). </dd>

<dt> repodir </dt>
<dd> The directory hosting the repository of service sets managed by the
<a href="//skarnet.org/software/s6-rc/repodefs.html">s6-rc <em>repo</em> commands</a>.
The default is <tt>/var/lib/s6-rc/repository</tt> (possibly overridden by the <tt>--repodir</tt> build-time configure option to
<a href="//skarnet.org/software/s6-rc/">s6-rc</a> or to
<a href="//skarnet.org/software/s6-frontend/">s6-frontend</a>). </dd>

<dt> bootdb </dt>
<dd> The path to the boot-time compiled service database.
The default is <tt>/etc/s6-rc/compiled/current</tt> (possibly overridden by the <tt>--bootdb</tt> build-time configure option to
<a href="//skarnet.org/software/s6-rc/">s6-rc</a> or to
<a href="//skarnet.org/software/s6-frontend/">s6-frontend</a>). </dd>

<dt> stmpdir </dt>
<dd> A directory suitable for root-only runtime data and temporary files for s6-frontend.
The default is <tt>/run/s6-frontend</tt> (possibly overridden by the <tt>--stmpdir</tt> build-time configure option to
<a href="//skarnet.org/software/s6-frontend/">s6-frontend</a>). </dd>

<dt> storelist </dt>
<dd> A colon-separated (<tt>:</tt>) list of directories containing the
<a href="//skarnet.org/software/s6-rc/repodefs.html#store">stores</a> of s6-rc service
definition directories.
The default is <tt>/usr/share/s6/sources:/etc/s6/sources</tt>
(possibly overridden by the <tt>--storelist</tt> build-time configure option to
<a href="//skarnet.org/software/s6-frontend/">s6-frontend</a>). </dd>

<dt> verbosity </dt>
<dd> The default verbosity for <a href="s6.html">s6</a> and its invoked commands. 0 is
terse (only print fatal error messages), 1 is normal (print error messages and warnings),
over 1 is increasingly verbose (print informational messages, up to tracing and debug
messages at level 4-5). The default is <strong>1</strong>. </dd>

<dt> fdhuser </dt>
<dd> The system user for the internal fd-holding process spawned by
s6-rc. It must be a user defined in <tt>/etc/passwd</tt>.
The default is <strong>root</strong> and that is fine, but distributions
may want to set it to an unprivileged user. </dd>
</dl>

<h2 id="userservices"> User services </h2>

<p>
  If <a href="s6.html">s6</a> is invoked with the <tt>--user</tt> flag,
the <tt>/etc/s6-user.conf</tt> file is used instead, with the same
syntax and the same variables, but additionally, the following
environment variables, if present, are substituted:
</p>

<ul>
 <li> <tt>XDG_RUNTIME_DIR</tt> </li>
 <li> <tt>XDG_DATA_HOME</tt> </li>
 <li> <tt>XDG_CONFIG_HOME</tt> </li>
 <li> <tt>XDG_STATE_HOME</tt> </li>
 <li> <tt>XDG_CACHE_HOME</tt> </li>
</ul>

<p>
 That means that a global <tt>/etc/s6-user.conf</tt> file can for instance declare
</p>

<pre>
 scandir=${XDG_RUNTIME_DIR}/service
</pre>

<p>
and the correct location for the <tt>scandir</tt> will be obtained, for every user.
</p>

<h3> Location </h3>

<p>
The global <tt>/etc/s6-user.conf</tt> path for the configuration variable can be
overridden by the admin at build time via the <tt>--userconffile</tt> configure
option, and by the user at <a href="s6.html">s6</a> run time via the
<tt>S6_USER_CONF</tt> environment variable.
</p>

</body>
</html>