aboutsummaryrefslogtreecommitdiff
path: root/man/openrc-run.8
diff options
context:
space:
mode:
Diffstat (limited to 'man/openrc-run.8')
-rw-r--r--man/openrc-run.812
1 files changed, 12 insertions, 0 deletions
diff --git a/man/openrc-run.8 b/man/openrc-run.8
index 278aa0e1..3fb5a5b3 100644
--- a/man/openrc-run.8
+++ b/man/openrc-run.8
@@ -284,6 +284,18 @@ system.
To see how to influence dependencies in configuration files, see the
.Sx FILES
section below.
+.Sh _pre AND _post FUNCTIONS
+Any command defined in extra_commands, extra_started_commands or
+extra_stopped_commands can have _pre and _post functions in the service
+script. If the command function is called foo, the_pre and _post
+functions for it should be called foo_pre and foo_post.
+.Pp
+These functions should be used to perform preparation before the
+command is run and cleanup after the command completes. In order for
+.Nm
+to record the command as being run successfully, the _pre
+function, command function itself and the _post function should all exit
+with a zero return code.
.Sh BUILTINS
.Nm
defines some builtin functions that you can use inside your service scripts: