service(1): Improve manual page
* Sort options.. * Fix some typos. * Use one Bd macro for code blocks instead of a bunch of Dl macros. * Improve formatting. * Clarify 'jail' argument PR: 228552 Submitted by: 0mp MFC After: 3 weeks
This commit is contained in:
parent
8ec6562b6d
commit
91339aaf7b
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd January 15, 2018
|
.Dd May 31, 2018
|
||||||
.Dt SERVICE 8
|
.Dt SERVICE 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -32,19 +32,24 @@
|
|||||||
.Nd "control (start/stop/etc.) or list system services"
|
.Nd "control (start/stop/etc.) or list system services"
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl j Ao jail name or id Ac
|
.Op Fl j Ar jail
|
||||||
.Fl e
|
.Fl e
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl j Ao jail name or id Ac
|
.Op Fl j Ar jail
|
||||||
.Fl R
|
.Fl R
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl j Ao jail name or id Ac
|
.Op Fl j Ar jail
|
||||||
.Op Fl v
|
.Op Fl v
|
||||||
.Fl l | r
|
.Fl l
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl j Ao jail name or id Ac
|
.Op Fl j Ar jail
|
||||||
.Op Fl v
|
.Op Fl v
|
||||||
.Ar <rc.d script> start|stop|etc.
|
.Fl r
|
||||||
|
.Nm
|
||||||
|
.Op Fl j Ar jail
|
||||||
|
.Op Fl v
|
||||||
|
.Ar script
|
||||||
|
.Ar command
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
@ -52,14 +57,16 @@ command is an easy interface to the rc.d system.
|
|||||||
Its primary purpose is to start and stop services provided
|
Its primary purpose is to start and stop services provided
|
||||||
by the rc.d scripts.
|
by the rc.d scripts.
|
||||||
When used for this purpose it will set the same restricted
|
When used for this purpose it will set the same restricted
|
||||||
environment that is in use at boot time (see below).
|
environment that is in use at boot time
|
||||||
|
.Po
|
||||||
|
see
|
||||||
|
.Sx ENVIRONMENT
|
||||||
|
.Pc .
|
||||||
It can also be used to list
|
It can also be used to list
|
||||||
the scripts using various criteria.
|
the scripts using various criteria.
|
||||||
.Pp
|
.Pp
|
||||||
The options are as follows:
|
The options are as follows:
|
||||||
.Bl -tag -width F1
|
.Bl -tag -width F1
|
||||||
.It Fl j Ao jail name or id Ac
|
|
||||||
Perform the given actions under the named jail.
|
|
||||||
.It Fl e
|
.It Fl e
|
||||||
List services that are enabled.
|
List services that are enabled.
|
||||||
The list of scripts to check is compiled using
|
The list of scripts to check is compiled using
|
||||||
@ -70,8 +77,11 @@ then that list of scripts is checked for an
|
|||||||
.Qq rcvar
|
.Qq rcvar
|
||||||
assignment.
|
assignment.
|
||||||
If present the script is checked to see if it is enabled.
|
If present the script is checked to see if it is enabled.
|
||||||
.It Fl R
|
.It Fl j Ar jail
|
||||||
Restart all enabled local services.
|
Perform the given actions under the named jail.
|
||||||
|
The
|
||||||
|
.Ar jail
|
||||||
|
argument can be either a jail ID or a jail name.
|
||||||
.It Fl l
|
.It Fl l
|
||||||
List all files in
|
List all files in
|
||||||
.Pa /etc/rc.d
|
.Pa /etc/rc.d
|
||||||
@ -88,8 +98,10 @@ Generate the
|
|||||||
as in
|
as in
|
||||||
.Fl e
|
.Fl e
|
||||||
above, but list all of the files, not just what is enabled.
|
above, but list all of the files, not just what is enabled.
|
||||||
|
.It Fl R
|
||||||
|
Restart all enabled local services.
|
||||||
.It Fl v
|
.It Fl v
|
||||||
Be slightly more verbose
|
Be slightly more verbose.
|
||||||
.El
|
.El
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
When used to run rc.d scripts the
|
When used to run rc.d scripts the
|
||||||
@ -111,21 +123,24 @@ at boot time.
|
|||||||
The following are examples of typical usage of the
|
The following are examples of typical usage of the
|
||||||
.Nm
|
.Nm
|
||||||
command:
|
command:
|
||||||
.Pp
|
.Bd -literal -offset -ident
|
||||||
.Dl "service named status"
|
service named status
|
||||||
.Dl "service -j dns named status"
|
service -j dns named status
|
||||||
.Dl "service -rv"
|
service -rv
|
||||||
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
The following programmable completion entry can be use in
|
The following programmable completion entry can be use in
|
||||||
.Xr bash 1
|
.Xr bash 1
|
||||||
for the names of the rc.d scripts:
|
for the names of the rc.d scripts:
|
||||||
.Dl "_service () {"
|
.Bd -literal -offset -ident
|
||||||
.Dl " local cur"
|
_service () {
|
||||||
.Dl " cur=${COMP_WORDS[COMP_CWORD]}"
|
local cur
|
||||||
.Dl " COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) )"
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
.Dl " return 0"
|
COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) )
|
||||||
.Dl "}"
|
return 0
|
||||||
.Dl "complete -F _service service"
|
}
|
||||||
|
complete -F _service service
|
||||||
|
.Ed
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr bash 1 Pq Pa ports/shells/bash ,
|
.Xr bash 1 Pq Pa ports/shells/bash ,
|
||||||
.Xr rc.conf 5 ,
|
.Xr rc.conf 5 ,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user