Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Openrc"

From Funtoo
Jump to navigation Jump to search
(Created page with "== Service script == === Extra commands === To add additional commands we must tell openrc about it and define a function with such name: <pre> extra_commands="cmd1" descript...")
 
Line 15: Line 15:
* <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.
* <code>RC_CMD</code> - a command/action name(e.g. start/stop/status/etc).

Revision as of 11:30, 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

  • 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.
  • RC_CMD - a command/action name(e.g. start/stop/status/etc).