Template:Daemon enable

From Gentoo Wiki
Jump to:navigation Jump to:search
[edit

Documentation

Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages. As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.

Use this template to show a root level terminal prompt pre-formatted with the commands to start and enable a daemon.

Parameters

To show how to start and enable a daemon

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
OpenRC service nameopenrc

Example
sshd
Stringoptional
OpenRC runlevel namerunlevel

Default
default
Example
boot
Stringoptional
SystemD unit namesystemd

Example
sshd
Stringoptional

Usage

{{Daemon enable|openrc=name|runlevel=name}}
{{Daemon enable|systemd=name}}

See the template's testcases:


Correct

OpenRC with runlevel
Wiki code
{{Daemon enable|openrc=elogind|runlevel=boot}}
Main version
root #rc-service elogind start
root #rc-update add elogind boot
Sandbox version


OpenRC
Wiki code
{{Daemon enable|openrc=sshd}}
Main version
root #rc-service sshd start
root #rc-update add sshd default
Sandbox version


SystemD
Wiki code
{{Daemon enable|systemd=sshd.service}}
Main version
root #systemctl start sshd.service
root #systemctl enable sshd.service
Sandbox version


Incorrect

No parameter (error message)
Wiki code
{{Daemon enable}}
Main version
{{Daemon start template error}}
Parameter openrc not defined. For correct usage see Daemon start template's documentation on the openrc parameter.
Sandbox version


Both "openrc" and "systemd" parameters (only "openrc" is used)
Wiki code
{{Daemon enable|openrc=sshd|systemd=sshd.service}}
Main version
root #rc-service sshd start
root #rc-update add sshd default
Sandbox version


See also

  • {{RootCmd}} - Show a terminal prompt with root user permissions.
Note
The above documentation is transcluded from Template:Daemon enable/doc. (edit | history)
Editors can experiment in this template's sandbox (create) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)