Merge #392 systemd management: replace Requires=network with After=
This commit is contained in:
commit
c8fb305e6d
2 changed files with 5 additions and 5 deletions
|
@ -33,7 +33,7 @@ If you enable the custom _systemd_ service to start at boot (`systemctl enable f
|
|||
----
|
||||
[Unit]
|
||||
Description=My custom service
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
----
|
||||
|
||||
. Identify the command used to start the service in the SysVinit script and convert this to the _systemd_ equivalent. For example, the script might contain a `start` function in the following format:
|
||||
|
|
|
@ -25,15 +25,15 @@ This procedure creates a basic configuration file to control the `foo` service.
|
|||
+
|
||||
`Description`::
|
||||
A string describing the unit. _Systemd_ displays this description next to the unit name in the user interface.
|
||||
`Requires`::
|
||||
Defines unit to use as a dependency for the service. If you activate the unit, _systemd_ activates the units listed in `Requires` as well. For example, the `foo` service might require network connectivity, which means the `foo` services requires `network.target` as a dependency.
|
||||
`After`::
|
||||
Defines a relationship with a second unit. If you activate the unit, _systemd_ activates it only after the second one. For example, the `foo` service might require network connectivity, which means the `foo` services specifies `network.target` as an `After=` condition.
|
||||
+
|
||||
The resulting `[Unit]` section looks like this:
|
||||
+
|
||||
----
|
||||
[Unit]
|
||||
Description=My custom service
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
----
|
||||
|
||||
.. The `[Service]` section provides instructions on how to control the service. The `foo` service uses the following parameters:
|
||||
|
@ -61,7 +61,7 @@ ExecStart=/usr/bin/sleep infinity
|
|||
----
|
||||
[Unit]
|
||||
Description=My custom service
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue