.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "SERVICE" 8 "" "Jan 2006" "System Manager's Manual" .SH NAME service \- run a System V init script .SH SYNOPSIS .sp \fBservice\fP \fISCRIPT\fP \fICOMMAND\fP [\fIOPTIONS\fP] .sp \fBservice\fP \fB\-\-status\-all\fP .sp \fBservice\fP \fB\-\-help\fP | \fB\-h\fP | \fB\-\-version\fP .SH DESCRIPTION .sp \fBservice\fP runs a System V init script or systemd unit in as predictable an environment as possible, removing most environment variables and with the current working directory set to \fB/\fP\&. .sp The \fISCRIPT\fP parameter specifies a System V init script, located in \fI/etc/init.d/SCRIPT\fP, or the name of a systemd unit. The existence of a systemd unit of the same name as a script in \fB/etc/init.d\fP will cause the unit to take precedence over the init.d script. The supported values of \fICOMMAND\fP depend on the invoked script. \fBservice\fP passes \fICOMMAND\fP and \fIOPTIONS\fP to the init script unmodified. For systemd units, start, stop, status, and reload are passed through to their systemctl/initctl equivalents. .sp All scripts should support at least the \fBstart\fP and \fBstop\fP commands. As a special case, if \fICOMMAND\fP is \fB\-\-full\-restart\fP, the script is run twice, first with the \fBstop\fP command, then with the \fBstart\fP command. Note, that unlike \fBupdate\-rc.d\fP(8), \fBservice\fP does not check \fB/usr/sbin/policy\-rc.d\fP\&. .sp \fBservice \-\-status\-all\fP runs all init scripts, in alphabetical order, with the \fBstatus\fP command. The status is [ + ] for running services, [ \- ] for stopped services and [ ? ] for services without a \fBstatus\fP command. This option only calls status for sysvinit jobs. .SH EXIT CODES .sp \fBservice\fP calls the init script and returns the status returned by it. .SH FILES .INDENT 0.0 .TP .B \fB/etc/init.d\fP The directory containing System V init scripts. .TP .B \fB/{lib,run,etc}/systemd/system\fP The directories containing systemd units. .UNINDENT .SH ENVIRONMENT .INDENT 0.0 .TP .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 The only environment variables passed to the init scripts. .UNINDENT .SH SEE ALSO .nf \fI/etc/init.d/skeleton\fP \fBupdate\-rc.d\fP(8) \fBinit\fP(8) \fBinvoke\-rc.d\fP(8) \fBsystemctl\fP(1) .fi .sp .SH AUTHOR Miloslav Trmac , Petter Reinholdtsen License: GNU General Public License v2 (GPLv2) .SH COPYRIGHT 2006 Red Hat, Inc., Petter Reinholdtsen .\" Generated by docutils manpage writer. .