注意:

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

Openrc

From Funtoo
Jump to navigation Jump to search

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).