Debian Codegraph @

upstream/mageia-cauldron/man8/service.8

raw
1 .\" A man page for service(8). -*- nroff -*-
2 .\"
3 .\" Copyright (C) 2006 Red Hat, Inc. All rights reserved.
4 .\"
5 .\" This copyrighted material is made available to anyone wishing to use,
6 .\" modify, copy, or redistribute it subject to the terms and conditions of the
7 .\" GNU General Public License v.2.
8 .\"
9 .\" This program is distributed in the hope that it will be useful, but WITHOUT
10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 .\" more details.
13 .\"
14 .\" You should have received a copy of the GNU General Public License along
15 .\" with this program; if not, write to the Free Software Foundation, Inc.,
16 .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 .\"
18 .\" Author: Miloslav Trmac <[email protected]>
19 .TH service 8 "Jan 2006"
20
21 .SH NAME
22 service \- run a System V init script
23
24 .SH SYNOPSIS
25 \fBservice\fR \fISCRIPT\fR \fICOMMAND\fR [\fIOPTIONS\fR]
26
27 \fBservice \-\-status\-all\fR
28
29 \fBservice\fR \fB\-\-help\fR | \fB\-h\fR | \fB\-\-version\fR
30
31 .SH DESCRIPTION
32 .B service
33 runs a System V init script in as predictable environment as possible,
34 removing most environment variables
35 and with current working directory set to \fB/\fR.
36
37 The
38 .I SCRIPT
39 parameter specifies a System V init script,
40 located in \fB/etc/init.d/\fISCRIPT\fR.
41 The supported values of
42 .I COMMAND
43 depend on the invoked script,
44 .B service
45 passes
46 .I COMMAND
47 and
48 .I OPTIONS
49 it to the init script unmodified.
50 All scripts should support at least the
51 .B start
52 and
53 .B stop
54 commands.
55 As a special case, if
56 .I COMMAND
57 is \fB\-\-full-restart\fR, the script is run twice, first with the
58 .B stop
59 command, then with the
60 .B start
61 command.
62
63 .B service \-\-status\-all
64 runs all init scripts, in alphabetical order, with the
65 .B status
66 command.
67
68 If the init script file does not exist, the script tries to use
69 .B legacy actions.
70 If there is no suitable legacy action found and
71 .I COMMAND
72 is one of actions specified in LSB Core Specification, input is redirected to the
73 .B systemctl.
74 Otherwise the command fails with return code 2.
75
76 .SH FILES
77 .TP
78 \fB/etc/init.d\fR
79 The directory containing System V init scripts.
80
81 .SH ENVIRONMENT
82 .TP
83 \fBPATH\fR, \fBTERM\fR
84 The only environment variables passed to the init scripts.
85
86 .SH SEE ALSO
87 .BR chkconfig (8),
88 .BR ntsysv(8),
89 .BR systemd (1),
90 .BR systemctl (8),
91 .BR systemd.service (5)