1 .TH START\-STOP\-DAEMON 8 "15th March 1997" "Debian Project" "dpkg utilities"
3 start\-stop\-daemon \- start and stop system daemon programs
11 .B start\-stop\-daemon
15 .B start\-stop\-daemon
18 .B start\-stop\-daemon
21 .B start\-stop\-daemon
22 is used to control the creation and termination of system-level processes.
24 .BR \-\-exec ", " \-\-pidfile ", " \-\-user ", and " \-\-name " options,"
25 .B start\-stop\-daemon
26 can be configured to find existing instances of a running process.
30 .B start\-stop\-daemon
31 checks for the existence of a specified process.
32 If such a process exists,
33 .B start\-stop\-daemon
34 does nothing, and exits with error status 1 (0 if
37 If such a process does not exist, it starts an
38 instance, using either the executable specified by
42 Any arguments given after
44 on the command line are passed unmodified to the program being
49 .B start\-stop\-daemon
50 also checks for the existence of a specified process.
51 If such a process exists,
52 .B start\-stop\-daemon
53 sends it the signal specified by
55 and exits with error status 0.
56 If such a process does not exist,
57 .B start\-stop\-daemon
58 exits with error status 1
64 .B start\-stop\-daemon
65 will check that the process(es) have terminated.
70 .B start\-stop\-daemon
73 .B start\-stop\-daemon
74 will scan the process table looking for any processes which
75 match the process name, uid, and/or gid (if specified). Any
76 matching process will prevent
78 from starting the daemon. All matching processes will be
79 sent the KILL signal if
81 is specified. For daemons which have long-lived children
82 which need to live through a
84 you must specify a pidfile.
89 \fB\-x\fP|\fB\-\-exec\fP \fIexecutable\fP
90 Check for processes that are instances of this executable (according to
91 .B /proc/\fIpid\fB/exe\fP
94 \fB\-p\fP|\fB\-\-pidfile\fP \fIpid-file\fP
95 Check whether a process has created the file
98 \fB\-u\fP|\fB\-\-user\fP \fIusername\fP|\fIuid\fP
99 Check for processes owned by the user specified by
104 \fB\-g\fP|\fB\-\-group\fP \fIgroup\fP|\fIgid\fP
105 Change to \fIgroup\fP or \fIgid\fP when starting the process.
107 \fB\-n\fP|\fB\-\-name\fP \fIprocess-name\fP
108 Check for processes with the name
111 .BR /proc/\fIpid\fB/stat\fP ).
113 \fB\-s\fP|\fB\-\-signal\fP \fIsignal\fP
116 specifies the signal to send to processes being stopped (default 15).
118 \fB\-R\fP|\fB\-\-retry\fP \fItimeout\fP|\fIschedule\fP
122 .B start\-stop\-daemon
123 is to check whether the process(es)
124 do finish. It will check repeatedly whether any matching processes
125 are running, until none are. If the processes do not exit it will
126 then take further action as determined by the schedule.
130 is specified instead of
133 .IB signal / timeout /KILL/ timeout
136 is the signal specified with
140 is a list of at least two items separated by slashes
144 or [\fB\-\fP]\fIsignal-name\fP,
145 which means to send that signal,
148 which means to wait that many seconds for processes to
152 which means to repeat the rest of the schedule forever if
155 If the end of the schedule is reached and
157 is not specified, then
158 .B start\-stop\-daemon
159 exits with error status 2.
160 If a schedule is specified, then any signal specified
165 \fB\-a\fP|\fB\-\-startas\fP \fIpathname\fP
168 start the process specified by
170 If not specified, defaults to the argument given to
174 Print actions that would be taken and set appropriate return value,
178 Return exit status 0 instead of 1 if no actions are (would be) taken.
181 Do not print informational messages; only display error messages.
183 \fB\-c\fP|\fB\-\-chuid\fP \fIusername\fR|\fIuid\fP
184 Change to this username/uid before starting the process. You can also
185 specify a group by appending a
187 then the group or gid in the same way
188 as you would for the `chown' command (\fIuser\fP\fB:\fP\fIgroup\fP).
189 When using this option
190 you must realize that the primary and supplemental groups are set as well,
193 option is not specified. The
196 groups that the user isn't normally a member of (like adding per/process
197 group membership for generic users like
200 \fB\-r\fP|\fB\-\-chroot\fP \fIroot\fP
203 before starting the process. Please note that the pidfile is also written
206 .BR \-D ", " \-\-dropcap " \fIcapabilities1,capabilities2\fP"
207 Drop theses capabilities separated by commas.
209 \fB\-d\fP|\fB\-\-chdir\fP \fIpath\fP
212 before starting the process. This is done after the chroot if the
213 \fB\-r\fP|\fB\-\-chroot\fP option is set. When not specified,
214 start\-stop\-daemon will chdir to the root directory before starting
217 .BR \-b | \-\-background
218 Typically used with programs that don't detach on their own. This option
220 .B start\-stop\-daemon
221 to fork before starting the process, and force it into the background.
222 .B WARNING: start\-stop\-daemon
223 cannot check the exit status if the process fails to execute for
225 reason. This is a last resort, and is only meant for programs that either
226 make no sense forking on their own, or where it's not feasible to add the
227 code for it to do this itself.
229 \fB\-N\fP|\fB\-\-nicelevel\fP \fIint\fP
230 This alters the prority of the process before starting it.
232 .BR \-m | \-\-make\-pidfile
233 Used when starting a program that does not create its own pid file. This
235 .B start\-stop\-daemon
236 create the file referenced with
238 and place the pid into it just before executing the process. Note, it will
239 not be removed when stopping the program.
241 This feature may not work in all cases. Most notably when the program
242 being executed forks from its main process. Because of this it is usually
243 only useful when combined with the
247 .BR \-v | \-\-verbose
248 Print verbose informational messages.
251 Print help information; then exit.
253 .BR \-V | \-\-version
254 Print version information; then exit.
257 Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl> based on
258 a previous version by Ian Jackson <ian@chiark.greenend.org.uk>.
260 Manual page by Klee Dienes <klee@mit.edu>, partially reformatted