diff --git a/modules/ROOT/pages/_partials/proc_converting-sysvinit-services.adoc b/modules/ROOT/pages/_partials/proc_converting-sysvinit-services.adoc index 6597ae2..ec9ef1c 100644 --- a/modules/ROOT/pages/_partials/proc_converting-sysvinit-services.adoc +++ b/modules/ROOT/pages/_partials/proc_converting-sysvinit-services.adoc @@ -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: diff --git a/modules/ROOT/pages/_partials/proc_creating-new-systemd-services.adoc b/modules/ROOT/pages/_partials/proc_creating-new-systemd-services.adoc index b43e0f4..2100fb3 100644 --- a/modules/ROOT/pages/_partials/proc_creating-new-systemd-services.adoc +++ b/modules/ROOT/pages/_partials/proc_creating-new-systemd-services.adoc @@ -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