2017-05-08 10:43:17 -04:00
|
|
|
.PP
|
2014-01-16 16:16:24 -08:00
|
|
|
The following options are valid on POSIX based platforms.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
2010-06-29 12:32:16 -07:00
|
|
|
\fB\-\-pidfile\fR[\fB=\fIpidfile\fR]
|
2009-07-08 13:19:16 -07:00
|
|
|
Causes a file (by default, \fB\*(PN.pid\fR) to be created indicating
|
2010-06-29 12:32:16 -07:00
|
|
|
the PID of the running process. If the \fIpidfile\fR argument is not
|
|
|
|
specified, or
|
2009-07-08 13:19:16 -07:00
|
|
|
if it does not begin with \fB/\fR, then it is created in
|
|
|
|
\fB@RUNDIR@\fR.
|
2010-06-29 12:32:16 -07:00
|
|
|
.IP
|
2010-06-29 14:29:40 -07:00
|
|
|
If \fB\-\-pidfile\fR is not specified, no pidfile is created.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
2010-06-29 14:29:40 -07:00
|
|
|
\fB\-\-overwrite\-pidfile\fR
|
|
|
|
By default, when \fB\-\-pidfile\fR is specified and the specified pidfile
|
2009-08-05 14:20:24 -07:00
|
|
|
already exists and is locked by a running process, \fB\*(PN\fR refuses
|
2010-06-29 14:29:40 -07:00
|
|
|
to start. Specify \fB\-\-overwrite\-pidfile\fR to cause it to instead
|
2009-08-05 14:20:24 -07:00
|
|
|
overwrite the pidfile.
|
2010-02-24 13:42:43 -08:00
|
|
|
.IP
|
2010-06-29 14:29:40 -07:00
|
|
|
When \fB\-\-pidfile\fR is not specified, this option has no effect.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2015-12-01 09:55:17 -08:00
|
|
|
.IP \fB\-\-detach\fR
|
|
|
|
Runs \fB\*(PN\fR as a background process. The process forks, and in
|
|
|
|
the child it starts a new session, closes the standard file
|
|
|
|
descriptors (which has the side effect of disabling logging to the
|
|
|
|
console), and changes its current directory to the root (unless
|
|
|
|
\fB\-\-no\-chdir\fR is specified). After the child completes its
|
|
|
|
initialization, the parent exits. \*(DD
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2010-01-15 12:13:46 -08:00
|
|
|
.TP
|
2010-06-29 14:29:40 -07:00
|
|
|
\fB\-\-monitor\fR
|
2010-01-15 12:13:46 -08:00
|
|
|
Creates an additional process to monitor the \fB\*(PN\fR daemon. If
|
|
|
|
the daemon dies due to a signal that indicates a programming error
|
2013-10-11 16:52:50 -07:00
|
|
|
(\fBSIGABRT\fR, \fBSIGALRM\fR, \fBSIGBUS\fR, \fBSIGFPE\fR,
|
|
|
|
\fBSIGILL\fR, \fBSIGPIPE\fR, \fBSIGSEGV\fR, \fBSIGXCPU\fR, or
|
|
|
|
\fBSIGXFSZ\fR) then the monitor process starts a new copy of it. If
|
|
|
|
the daemon dies or exits for another reason, the monitor process exits.
|
2010-01-15 12:13:46 -08:00
|
|
|
.IP
|
2010-06-29 14:29:40 -07:00
|
|
|
This option is normally used with \fB\-\-detach\fR, but it also
|
2010-01-15 12:13:46 -08:00
|
|
|
functions without it.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-08-04 22:41:46 -07:00
|
|
|
.TP
|
2010-06-29 14:29:40 -07:00
|
|
|
\fB\-\-no\-chdir\fR
|
|
|
|
By default, when \fB\-\-detach\fR is specified, \fB\*(PN\fR
|
2009-08-04 22:41:46 -07:00
|
|
|
changes its current working directory to the root directory after it
|
|
|
|
detaches. Otherwise, invoking \fB\*(PN\fR from a carelessly chosen
|
|
|
|
directory would prevent the administrator from unmounting the file
|
|
|
|
system that holds that directory.
|
|
|
|
.IP
|
2010-06-29 14:29:40 -07:00
|
|
|
Specifying \fB\-\-no\-chdir\fR suppresses this behavior, preventing
|
2009-08-04 22:41:46 -07:00
|
|
|
\fB\*(PN\fR from changing its current working directory. This may be
|
|
|
|
useful for collecting core files, since it is common behavior to write
|
|
|
|
core dumps into the current working directory and the root directory
|
|
|
|
is not a good directory to use.
|
|
|
|
.IP
|
2010-06-29 14:29:40 -07:00
|
|
|
This option has no effect when \fB\-\-detach\fR is not specified.
|
2015-09-11 11:26:39 -07:00
|
|
|
.
|
|
|
|
.TP
|
2016-06-20 14:19:40 -07:00
|
|
|
\fB\-\-no\-self\-confinement\fR
|
|
|
|
By default daemon will try to self-confine itself to work with
|
|
|
|
files under well-know, at build-time whitelisted directories. It
|
|
|
|
is better to stick with this default behavior and not to use this
|
|
|
|
flag unless some other Access Control is used to confine daemon.
|
|
|
|
Note that in contrast to other access control implementations that
|
|
|
|
are typically enforced from kernel-space (e.g. DAC or MAC),
|
|
|
|
self-confinement is imposed from the user-space daemon itself and
|
|
|
|
hence should not be considered as a full confinement strategy, but
|
|
|
|
instead should be viewed as an additional layer of security.
|
|
|
|
.
|
|
|
|
.TP
|
2015-09-11 11:26:39 -07:00
|
|
|
\fB\-\-user\fR
|
2015-10-09 18:48:59 -07:00
|
|
|
Causes \fB\*(PN\fR to run as a different user specified in "user:group", thus
|
|
|
|
dropping most of the root privileges. Short forms "user" and ":group" are also
|
2015-09-11 11:26:39 -07:00
|
|
|
allowed, with current user or group are assumed respectively. Only daemons
|
|
|
|
started by the root user accepts this argument.
|
|
|
|
.IP
|
|
|
|
On Linux, daemons will be granted CAP_IPC_LOCK and CAP_NET_BIND_SERVICES
|
2016-08-10 16:05:14 -07:00
|
|
|
before dropping root privileges. Daemons that interact with a datapath,
|
2018-03-29 23:05:29 -03:00
|
|
|
such as \fBovs\-vswitchd\fR, will be granted three additional capabilities,
|
|
|
|
namely CAP_NET_ADMIN, CAP_NET_BROADCAST and CAP_NET_RAW. The capability
|
|
|
|
change will apply even if the new user is root.
|
2015-09-11 11:26:39 -07:00
|
|
|
.IP
|
|
|
|
On Windows, this option is not currently supported. For security reasons,
|
|
|
|
specifying this option will cause the daemon process not to start.
|