/[baselayout]/trunk/man/start-stop-daemon.8
Gentoo

Contents of /trunk/man/start-stop-daemon.8

Parent Directory Parent Directory | Revision Log Revision Log


Revision 77 - (show annotations) (download)
Sat Dec 8 22:19:04 2001 UTC (18 years ago) by woodchip
File size: 6037 byte(s)
runscript is moved here, instead of sitting in init.d.
this was desired, as a note, FIXME, deal, was around in baselayout..

start-stop-daemon is latest and greatest, coming from Debian project,
moved from our sysvinit package to here now.

1 .\" Hey, Emacs! This is an -*- nroff -*- source file.
2 .TH START\-STOP\-DAEMON 8 "15th March 1997" "Debian Project" "Debian GNU/Linux"
3 .SH NAME
4 start\-stop\-daemon \- start and stop system daemon programs
5 .SH SYNOPSIS
6 .B start-stop-daemon
7 .BR -S | --start
8 .IR options
9 .RB [ \-\- ]
10 .IR arguments
11 .HP
12 .B start-stop-daemon
13 .BR -K | --stop
14 .IR options
15 .HP
16 .B start-stop-daemon
17 .BR -H | --help
18 .HP
19 .B start-stop-daemon
20 .BR -V | --version
21 .SH DESCRIPTION
22 .B start\-stop\-daemon
23 is used to control the creation and termination of system-level processes.
24 Using the
25 .BR --exec ", " --pidfile ", " --user ", and " --name " options,"
26 .B start\-stop\-daemon
27 can be configured to find existing instances of a running process.
28
29 With
30 .BR --start ,
31 .B start\-stop\-daemon
32 checks for the existence of a specified process.
33 If such a process exists,
34 .B start\-stop\-daemon
35 does nothing, and exits with error status 1 (0 if
36 .BR --oknodo
37 is specified).
38 If such a process does not exist, it starts an
39 instance, using either the executable specified by
40 .BR --exec ,
41 (or, if specified, by
42 .BR --startas ).
43 Any arguments given after
44 .BR --
45 on the command line are passed unmodified to the program being
46 started. If
47 .B --retry
48 is specified then start-stop-daemon will check that the process(es)
49 have terminated.
50
51 With
52 .BR --stop ,
53 .B start\-stop\-daemon
54 also checks for the existence of a specified process.
55 If such a process exists,
56 .B start\-stop\-daemon
57 sends it the signal specified by
58 .BR --signal ,
59 and exits with error status 0.
60 If such a process does not exist,
61 .B start\-stop\-daemon
62 exits with error status 1
63 (0 if
64 .BR --oknodo
65 is specified).
66
67 .SH OPTIONS
68
69 .TP
70 \fB-x\fP|\fB--exec\fP \fIexecutable\fP
71 Check for processes that are instances of this executable (according to
72 .B /proc/
73 .I pid
74 .B /exe
75 ).
76 .TP
77 \fB-p\fP|\fB--pidfile\fP \fIpid-file\fP
78 Check for processes whose process-id is specified in
79 .I pid-file.
80 .TP
81 \fB-u\fP|\fB--user\fP \fIusername\fP|\fIuid\fP
82 Check for processes owned by the user specified by
83 .I username
84 or
85 .I uid.
86 .TP
87 \fB-n\fP|\fB--name\fP \fIprocess-name\fP
88 Check for processes with the name
89 .I process-name
90 (according to
91 .B /proc/
92 .I pid
93 .B /stat
94 ).
95 .TP
96 \fB-s\fP|\fB--signal\fP \fIsignal\fP
97 With
98 .BR --stop
99 , specifies the signal to send to processes being stopped (default 15).
100 .TP
101 \fB-R\fP|\fB--retry\fP \fItimeout\fP|\fIschedule\fP
102 With
103 .BR --stop ,
104 specifies that
105 .B start-stop-daemon
106 is to check whether the process(es)
107 do finish. It will check repeatedly whether any matching processes
108 are running, until none are. If the processes do not exit it will
109 then take further action as determined by the schedule.
110
111 If
112 .I timeout
113 is specified instead of
114 .I schedule
115 then the schedule
116 .IB signal / timeout /KILL/ timeout
117 is used, where
118 .I signal
119 is the signal specified with
120 .BR --signal .
121
122 .I schedule
123 is a list of at least two items separated by slashes
124 .RB ( / );
125 each item may be
126 .BI - signal-number
127 or [\fB\-\fP]\fIsignal-name\fP,
128 which means to send that signal,
129 or
130 .IR timeout ,
131 which means to wait that many seconds for processes to
132 exit,
133 or
134 .BR forever ,
135 which means to repeat the rest of the schedule forever if
136 necessary.
137
138 If the end of the schedule is reached and
139 .BR forever
140 is not specified, then
141 .B start-stop-daemon
142 exits with error status 2.
143 If a schedule is specified, then any signal specified
144 with
145 .B --signal
146 is ignored.
147 .TP
148 \fB-a\fP|\fB--startas\fP \fIpathname\fP
149 With
150 .BR --start ,
151 start the process specified by
152 .IR pathname .
153 If not specified, defaults to the argument given to
154 .BR --exec .
155 .TP
156 .BR -t | --test
157 Print actions that would be taken and set appropriate return value,
158 but take no action.
159 .TP
160 .BR -o | --oknodo
161 Return exit status 0 instead of 1 if no actions are (would be) taken.
162 .TP
163 .BR -q | --quiet
164 Do not print informational messages; only display error messages.
165 .TP
166 \fB-c\fP|\fB--chuid\fP \fIusername\fR|\fIuid\fP
167 Change to this username/uid before starting the process. You can also
168 specify a group by appending a
169 .BR : ,
170 then the group or gid in the same way
171 as you would for the `chown' command (\fIuser\fP\fB:\fP\fIgroup\fP).
172 When using this option
173 you must realize that the primary and supplemental groups are set as well,
174 even if the
175 .B --group
176 option is not specified. The
177 .B --group
178 option is only for
179 groups that the user isn't normally a member of (like adding per/process
180 group membership for generic users like
181 .BR nobody ).
182 .TP
183 \fB-r\fP|\fB--chroot\fP \fIroot\fP
184 Chdir and chroot to
185 .I root
186 before starting the process. Please note that the pidfile is also written
187 after the chroot.
188 .TP
189 .BR -b | --background
190 Typically used with programs that don't detach on their own. This option
191 will force
192 .B start-stop-daemon
193 to fork before starting the process, and force it into the background.
194 .B WARNING: start-stop-daemon
195 cannot check the exit status if the process fails to execute for
196 .B any
197 reason. This is a last resort, and is only meant for programs that either
198 make no sense forking on their own, or where it's not feasible to add the
199 code for it to do this itself.
200 .TP
201 .BR -N | --nicelevel
202 This alters the prority of the process before starting it.
203 .TP
204 .BR -m | --make-pidfile
205 Used when starting a program that does not create its own pid file. This
206 option will make
207 .B start-stop-daemon
208 create the file referenced with
209 .B --pidfile
210 and place the pid into it just before executing the process. Note, it will
211 not be removed when stopping the program.
212 .B NOTE:
213 This feature may not work in all cases. Most notably when the program
214 being executed forks from its main process. Because of this it is usually
215 only useful when combined with the
216 .B --background
217 option.
218 .TP
219 .BR -v | --verbose
220 Print verbose informational messages.
221 .TP
222 .BR -H | --help
223 Print help information; then exit.
224 .TP
225 .BR -V | --version
226 Print version information; then exit.
227
228 .SH AUTHORS
229 Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl> based on
230 a previous version by Ian Jackson <ian@chiark.greenend.org.uk>.
231
232 Manual page by Klee Dienes <klee@mit.edu>, partially reformatted
233 by Ian Jackson.

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20