Clarify the documentation about the restart function
Restart has never been able to be overridden in OpenRc, but there is a way to make your service script behave differently when restart is being executed. X-Gentoo-Bug: 480866 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=480866
This commit is contained in:
parent
6b0ffd3103
commit
b2f8ac9382
@ -60,7 +60,10 @@ First we ensure that any services that depend on us are stopped. If any
|
|||||||
services that need us fail to stop then we exit with a suitable error,
|
services that need us fail to stop then we exit with a suitable error,
|
||||||
otherwise call the supplied stop function if it exists.
|
otherwise call the supplied stop function if it exists.
|
||||||
.It Ar restart
|
.It Ar restart
|
||||||
Stop and start the service, including dependencies.
|
Stop and start the service, including dependencies. This cannot be
|
||||||
|
overridden. See the description of the RC_CMD variable below for the
|
||||||
|
method to make your service behave differently when restart is being
|
||||||
|
executed.
|
||||||
.It Ar status
|
.It Ar status
|
||||||
Show the status of the service. The return code matches the status, with the
|
Show the status of the service. The return code matches the status, with the
|
||||||
exception of "started" returning 0 to match standard command behaviour.
|
exception of "started" returning 0 to match standard command behaviour.
|
||||||
@ -362,7 +365,8 @@ offset. Otherwise it is undefined.
|
|||||||
The result of `uname -s`.
|
The result of `uname -s`.
|
||||||
.It Va RC_CMD
|
.It Va RC_CMD
|
||||||
This contains the name of the command the service script is executing, such
|
This contains the name of the command the service script is executing, such
|
||||||
as start, stop, restart etc.
|
as start, stop, restart etc. One example of using this is to make a
|
||||||
|
service script behave differently when restart is being executed.
|
||||||
.El
|
.El
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Pp
|
.Pp
|
||||||
|
Loading…
Reference in New Issue
Block a user