753714f48f7615f6869180d5f085ad7d0d773fa2
[oweals/dinit.git] / doc / manpages / dinit.8
1 .TH DINIT "8" "March 2018" "Dinit 0.1.1" "Dinit \- service management system"
2 .SH NAME
3 dinit \- supervise processes and manage services
4 .\"
5 .SH SYNOPSIS
6 .\"
7 .B dinit
8 [\-s] [\-d \fIdir\fR] [\-p \fIpath\fR] [\fIservice-name\fR]
9 .\"
10 .SH DESCRIPTION
11 .\"
12 \fBDinit\fR is a process supervisor and service manager which can also
13 function as a system \fBinit\fR process. It has a small but functional
14 feature set, offering service dependency handling, parallel startup,
15 automatic rate-limited restart of failing processes, and service control
16 functions.
17
18 Dinit can be run as a system instance (when used as an \fBinit\fR or when
19 specified via command line parameter) or as a user instance. This affects
20 the default paths used to locate certain files, and the reaction to various
21 signals.
22
23 Dinit reads service descriptions from files located in the service
24 description directory, normally \fI/etc/dinit.d\fR for the system instance
25 or \fI$HOME/dinit.d\fR when run as a user process. See \fBSERVICE
26 DESCRIPTION FILES\fR for details.
27 .\"
28 .SH OPTIONS
29 .TP
30 \fB\-d\fR \fIdir\fP, \fB\-\-services\-dir\fR \fIdir\fP
31 Specifies \fIdir\fP as the directory containing service definition files.
32 .TP
33 \fB\-e\fR \fIfile\fP, \fB\-\-env\-file\fR \fIfile\fP
34 Read initial environment from \fIfile\fP. For the system init process, the
35 default is \fI/etc/dinit/environment\fR; see \fBFILES\fR.
36 .TP
37 \fB\-p\fR \fIpath\fP, \fB\-\-socket\-path\fR \fIpath\fP
38 Specifies \fIpath\fP as the path to the control socket used to listen for
39 commands from the \fBdinitctl\fR program.
40 .TP
41 \fB\-l\fR \fIpath\fP, \fB\-\-log\-file\fR \fIpath\fP
42 Species \fIpath\fP as the path to the log file, to which Dinit will log status
43 and error messages. Note that when running as the system init process, Dinit
44 does not begin logging until the log service has started. Using this option
45 inhibits logging via the syslog facility, however, all logging messages are
46 duplicated as usual to the console (so long as no service owns the console).
47 .TP
48 \fB\-s\fR, \fB\-\-system\fR
49 Run as the system init process. This is the default if invoked as PID 1.
50 This option affects the default service definition directory and
51 control socket path.
52 .TP
53 \fB\-\-help\fR
54 display this help and exit
55 .TP
56 \fIservice-name\fR
57 Specifies the name of the service that should be started (along with its
58 dependencies). If not specified, defaults to \fIboot\fR (which requires
59 that a suitable service description for the \fIboot\fR service exists).
60 .\"
61 .SH SERVICE DESCRIPTION FILES
62 .\"
63 Service description files specify the parameters of each service. They are
64 named for the service they describe, and are found in \fI/etc/dinit.d\fR
65 for a system instance or \fI$HOME/dinit.d\fR for a user instance.
66
67 Service description files are read by Dinit on an "as needed" basis. Once a
68 service description has been read there is no way (yet) to alter it.
69
70 See \fBdinit-service\fR(5) for details of the format and available parameters.
71 .\"
72 .SH FILES
73 .\"
74 .TP
75 \fI/etc/dinit/environment\fR
76 Default location of the environment file for Dinit when run as a system
77 instance (for user instances there is no default). Values are specified as
78 \fINAME\fR=\fIVALUE\fR, one per line, and add to and replace variables present
79 in the environment when Dinit started. Lines beginning with a hash character
80 (#) are ignored.
81 .\"
82 .SH SIGNALS
83 .LP
84 When run as a system process, SIGINT stops all services and performs a reboot (on Linux, this signal can be
85 generated using the control-alt-delete key combination); SIGTERM stops services and halts the system; and
86 SIGQUIT performs an immediate shutdown with no service rollback.
87 .LP
88 When run as a user process, SIGINT and SIGTERM both stop services and exit Dinit; SIGQUIT exits Dinit
89 immediately.
90 .\"
91 .SH SEE ALSO
92 .\"
93 \fBdinitctl\fR(8), \fBdinit-service\fR(5).
94 .\"
95 .SH AUTHOR
96 Dinit, and this manual, were written by Davin McCall.