Note
The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Openrc"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
=== Variables reference === | === Variables reference === | ||
==== We set ==== | ==== We set for openrc ==== | ||
* <code>description="DESC TEXT"</code> - a text which is outputed on <code>/etc/init.d/SCRIPT describe</code> command. | * <code>description="DESC TEXT"</code> - a text which is outputed on <code>/etc/init.d/SCRIPT describe</code> command. | ||
* <code>description_CMD="CMD DESC TEXT"</code> - a text which is outputed on <code>/etc/init.d/SCRIPT describe</code> command as CMD extra command description. | * <code>description_CMD="CMD DESC TEXT"</code> - a text which is outputed on <code>/etc/init.d/SCRIPT describe</code> command as CMD extra command description. | ||
* <code>extra_commands="cmd1 cmd2 ..."</code> - add specified additional functions to a service script. | * <code>extra_commands="cmd1 cmd2 ..."</code> - add specified additional functions to a service script. | ||
==== | ==== Openrc set for us ==== | ||
* <code>RC_CMD</code> - a command/action name(e.g. start/stop/status/etc). | * <code>RC_CMD</code> - a command/action name(e.g. start/stop/status/etc). |
Revision as of 11:32, May 12, 2020
Service script
Extra commands
To add additional commands we must tell openrc about it and define a function with such name:
extra_commands="cmd1" description_cmd1="do some additional action" cmd1() { ... }
Variables reference
We set for openrc
description="DESC TEXT"
- a text which is outputed on/etc/init.d/SCRIPT describe
command.description_CMD="CMD DESC TEXT"
- a text which is outputed on/etc/init.d/SCRIPT describe
command as CMD extra command description.extra_commands="cmd1 cmd2 ..."
- add specified additional functions to a service script.
Openrc set for us
RC_CMD
- a command/action name(e.g. start/stop/status/etc).