-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdenv.8
115 lines (115 loc) · 3.72 KB
/
denv.8
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
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "DENV" "8" "" ""
.SH NAME
denv \- Run a command in a modified environment
.SH SYNOPSIS
.sp
\fBdenv [options] command [command\-options]\fP
.sp
\fBenvdir d child\fP
.sp
The second form mimics the command line interface of the \fIenvdir(8)\fP
tool included in DJB\(aqs daemontools package, see CAVEATS for the
differences.
.SH DESCRIPTION
.sp
The \fBdlog\fP program modifies the environment variables as specified by
the supplied \fBoptions\fP and immediately executes the given \fBcommand\fP\&.
.sp
By default the environment will be empty. Variables from the parent process
may be incorporated using the \fB\-\-inherit\-env\fP and \fB\-\-inherit\fP options,
and new variables added or removed using the \fB\-\-environ\fP, \fB\-\-direnv\fP
and \fB\-\-file\fP options.
.SH USAGE
.sp
Command line options:
.INDENT 0.0
.TP
.B \-I\fP,\fB \-\-inherit\-env
Inherit all the environment variables from the parent
process that runs \fBdenv\fP\&.
.TP
.BI \-i \ NAME\fR,\fB \ \-\-inherit \ NAME
Inherit and environment variable from the parent process
that runs \fBdenv\fP given its \fBNAME\fP\&. This option may
be used multiple times.
.UNINDENT
.INDENT 0.0
.TP
.B \-E NAME[=VALUE], \-\-environ NAME[=VALUE]
Define an environment variable with a given \fBNAME\fP, and
assign a \fBVALUE\fP to it. If the value is not specified,
an existing variable is removed.
.UNINDENT
.INDENT 0.0
.TP
.BI \-d \ PATH\fR,\fB \ \-\-envdir \ PATH
Read each file from the directory at \fBPATH\fP, assigning
as variables named after the files, with their values
being the first line of contents. Trailing spaces are
removed from the values. If a file (or its first line)
is empty, the variable named after the file is removed.
Only regular files are taken into account, and in
particular symbolic links are \fInot\fP followed.
.TP
.BI \-f \ PATH\fR,\fB \ \-\-file \ PATH
Read lines from the file at \fBPATH\fP, each one containing
a \fBNAME=[VALUE]\fP environment variable assignment. Both
leading and trailing whitespace are removed from the line.
Each \fBNAME\fP must be a valid variable name. Empty lines
and lines beginning with the comment character \fB#\fP are
ignored. If a \fBVALUE\fP is omitted, then the variable is
removed from the environment. The file format is loosely
based on \fIenvironment.d(5)\fP\&.
.UNINDENT
.sp
The \fBdenv\fP program is often used in concert with \fIdmon(8)\fP to setup
the environment under which supervised programs run.
.SH EXIT CODES
.sp
\fBdenv\fP exits with code \fB111\fP if it has trouble preparing the environment
before executing the chained child process, or if the child process cannot
be executed. Otherwise its exit code is that of the child process.
.SH SEE ALSO
.sp
\fIdmon(8)\fP, \fIenvdir(8)\fP, \fIenvironment.d(5)\fP
.sp
<http://cr.yp.to/daemontools.html>
.SH CAVEATS
.sp
The original \fIenvdir(8)\fP program included in the daemontools suite converts
null characters (\fB\e0\fP) into new lines (\fB\en\fP). This behaviour is
deliberately left unimplemented in \fBdenv\fP, even when it runs in \fBenvdir\fP
mode.
.SH AUTHOR
Adrian Perez <[email protected]>
.\" Generated by docutils manpage writer.
.