.\"
.SH SYNOPSIS
.\"
+.HP \w'\ 'u
.B dinit
-[\-s] [\-d \fIdir\fR] [\-p \fIpath\fR] [\fIservice-name\fR]
+[\fB\-s\fR|\fB\-\-system\fR|\fB\-u\fR|\fB\-\-user\fR] [\fB\-d\fR|\fB\-\-services\-dir\fR \fIdir\fR]
+[\fB\-p\fR|\fB\-\-socket\-path\fR \fIpath\fR] [\fB\-e\fR|\fB\-\-env\-file\fR \fIpath\fR]
+[\fB\-l\fR|\fB\-\-log\-file\fR \fIpath\fR]
+[\fIservice-name\fR]
.\"
.SH DESCRIPTION
.\"
automatic rate-limited restart of failing processes, and service control
functions.
-Dinit can be run as a system instance (when used as an \fBinit\fR or when
+Dinit can be run as a system instance (when run as the root user or when
specified via command line parameter) or as a user instance. This affects
the default paths used to locate certain files, and the reaction to various
signals.
.TP
\fB\-l\fR \fIpath\fP, \fB\-\-log\-file\fR \fIpath\fP
Species \fIpath\fP as the path to the log file, to which Dinit will log status
-and error messages. Note that when running as the system init process, Dinit
+and error messages. Note that when running as the system service manager, Dinit
does not begin logging until the log service has started. Using this option
inhibits logging via the syslog facility, however, all logging messages are
duplicated as usual to the console (so long as no service owns the console).
.TP
\fB\-s\fR, \fB\-\-system\fR
-Run as the system init process. This is the default if invoked as PID 1.
-This option affects the default service definition directory and
-control socket path.
+Run as the system service manager. This is the default if invoked as the root
+user. This option affects the default service definition directory and control
+socket path.
+.TP
+\fB\-u\fR, \fB\-\-user\fR
+Run as a user. This is the opposite of \fB\-\-system\fR, and is the default if
+not invoked as the root user.
.TP
\fB\-\-help\fR
display this help and exit
else if (strcmp(argv[i], "--system") == 0 || strcmp(argv[i], "-s") == 0) {
am_system_init = true;
}
+ else if (strcmp(argv[i], "--user") == 0 || strcmp(argv[i], "-u") == 0) {
+ am_system_init = false;
+ }
else if (strcmp(argv[i], "--socket-path") == 0 || strcmp(argv[i], "-p") == 0) {
if (++i < argc) {
control_socket_path = argv[i];
" --services-dir <dir>, -d <dir>\n"
" set base directory for service description\n"
" files (-d <dir>)\n"
- " --system, -s run as the system init process\n"
+ " --system, -s run as the system service manager\n"
+ " --user, -u run as a user service manager\n"
" --socket-path <path>, -p <path>\n"
" path to control socket\n"
" <service-name> start service with name <service-name>\n";