Debian Codegraph @

upstream/debian-unstable/man8/service.8

raw
1 .\" Man page generated from reStructuredText.
2 .
3 .
4 .nr rst2man-indent-level 0
5 .
6 .de1 rstReportMargin
7 \\$1 \\n[an-margin]
8 level \\n[rst2man-indent-level]
9 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
10 -
11 \\n[rst2man-indent0]
12 \\n[rst2man-indent1]
13 \\n[rst2man-indent2]
14 ..
15 .de1 INDENT
16 .\" .rstReportMargin pre:
17 . RS \\$1
18 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
19 . nr rst2man-indent-level +1
20 .\" .rstReportMargin post:
21 ..
22 .de UNINDENT
23 . RE
24 .\" indent \\n[an-margin]
25 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
26 .nr rst2man-indent-level -1
27 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
29 ..
30 .TH "SERVICE" "8" "" "Jan 2006" "System Manager's Manual"
31 .SH NAME
32 service \- run a System V init script
33 .SH SYNOPSIS
34 .sp
35 \fBservice\fP \fISCRIPT\fP \fICOMMAND\fP [\fIOPTIONS\fP]
36 .sp
37 \fBservice\fP \fB\-\-status\-all\fP
38 .sp
39 \fBservice\fP \fB\-\-help\fP | \fB\-h\fP | \fB\-\-version\fP
40 .SH DESCRIPTION
41 .sp
42 \fBservice\fP runs a System V init script or systemd unit in as predictable an
43 environment as possible, removing most environment variables and with the
44 current working directory set to \fB/\fP\&.
45 .sp
46 The
47 \fISCRIPT\fP
48 parameter specifies a System V init script, located in \fI/etc/init.d/SCRIPT\fP,
49 or the name of a systemd unit. The existence of a systemd unit of the same
50 name as a script in \fB/etc/init.d\fP will cause the unit to take precedence
51 over the init.d script.
52 The supported values of \fICOMMAND\fP depend on the invoked script. \fBservice\fP
53 passes \fICOMMAND\fP and \fIOPTIONS\fP to the init script unmodified. For systemd
54 units, start, stop, status, and reload are passed through to their
55 systemctl/initctl equivalents.
56 .sp
57 All scripts should support at least the \fBstart\fP and \fBstop\fP commands.
58 As a special case, if \fICOMMAND\fP is \fB\-\-full\-restart\fP, the script is run
59 twice, first with the \fBstop\fP command, then with the \fBstart\fP
60 command. Note, that unlike \fBupdate\-rc.d\fP(8), \fBservice\fP does not
61 check \fB/usr/sbin/policy\-rc.d\fP\&.
62 .sp
63 \fBservice \-\-status\-all\fP runs all init scripts, in alphabetical order, with
64 the \fBstatus\fP command. The status is [ + ] for running services, [ \- ] for
65 stopped services and [ ? ] for services without a \fBstatus\fP command. This
66 option only calls status for sysvinit jobs.
67 .SH EXIT CODES
68 .sp
69 \fBservice\fP calls the init script and returns the status returned by it.
70 .SH FILES
71 .INDENT 0.0
72 .TP
73 .B \fB/etc/init.d\fP
74 The directory containing System V init scripts.
75 .TP
76 .B \fB/{lib,run,etc}/systemd/system\fP
77 The directories containing systemd units.
78 .UNINDENT
79 .SH ENVIRONMENT
80 .INDENT 0.0
81 .TP
82 .B \fBLANG\fP, \fBLANGUAGE\fP, \fBLC_CTYPE\fP, \fBLC_NUMERIC\fP, \fBLC_TIME\fP, \fBLC_COLLATE\fP, \fBLC_MONETARY\fP, \fBLC_MESSAGES\fP, \fBLC_PAPER\fP, \fBLC_NAME\fP, \fBLC_ADDRESS\fP, \fBLC_TELEPHONE\fP, \fBLC_MEASUREMENT\fP, \fBLC_IDENTIFICATION\fP, \fBLC_ALL\fP, \fBTERM\fP, \fBPATH\fP
83 The only environment variables passed to the init scripts.
84 .UNINDENT
85 .SH SEE ALSO
86 .nf
87 \fI/etc/init.d/skeleton\fP
88 \fBupdate\-rc.d\fP(8)
89 \fBinit\fP(8)
90 \fBinvoke\-rc.d\fP(8)
91 \fBsystemctl\fP(1)
92 .fi
93 .sp
94 .SH AUTHOR
95 Miloslav Trmac <[email protected]>,
96 Petter Reinholdtsen <[email protected]>
97
98 License: GNU General Public License v2 (GPLv2)
99 .SH COPYRIGHT
100 2006 Red Hat, Inc., Petter Reinholdtsen <[email protected]>
101 .\" Generated by docutils manpage writer.
102 .