From 172dd81e92198d4903a52001e20f0da7f0b9d8b2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 7 Jul 2025 10:10:29 +0200 Subject: [PATCH] man: improve Description= documentation This is an attempt to address the issues raised in #36165. Fixes: #36165 --- man/systemd.unit.xml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 04ba9e95ed5..7f552a687f1 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -597,19 +597,21 @@ Description= - A short human-readable title of the unit. This may be used by - systemd (and other UIs) as a user-visible label for the unit, so this string - should identify the unit rather than describe it, despite the name. This string also should not just - repeat the unit name. Apache2 Web Server is a good example. Bad examples are - high-performance lightweight HTTP server (too generic) or - Apache2 (meaningless for people who do not know Apache, duplicates the unit - name). systemd may use this string as a noun in status messages (Starting - description..., Started - description., Reached target - description., Failed to start - description.), so it should be capitalized, and should not be a - full sentence, or a phrase with a continuous verb. Bad examples include exiting the - container or updating the database once per day.. + A brief, meaningful, human-readable text identifying the unit. This may be used by + systemd (and suitable UIs) as a user-visible label for the unit, so this string + should identify the unit rather than just describe it, despite the name. This string also should not + just repeat the unit name. Apache HTTP Server or Postfix Mail + Server are good examples. Bad examples are high-performance lightweight HTTP + server (too generic) or Apache (meaningless for people who do not know + the Apache HTTP server project, duplicates the unit name). systemd may use this + string as a noun in status messages (Starting + Description..., Started + Description., Reached target + Description., Failed to start + Description.), so it should be capitalized, and should not be a + full sentence, or a phrase with a verb conjugated in the present continuous, or end in a full + stop. Bad examples include exiting the container, updating the database + once per day., or OpenSSH server second instance daemon. @@ -2563,7 +2565,7 @@ ExecStart=/usr/sbin/foo-daemon the following contents: [Unit] -Description=Some HTTP server +Description=Some HTTP Server After=remote-fs.target sqldb.service Requires=sqldb.service AssertPathExists=/srv/webserver @@ -2595,7 +2597,7 @@ WantedBy=multi-user.target change the chosen settings: [Unit] -Description=Some HTTP server +Description=Some HTTP Server After=remote-fs.target sqldb.service memcached.service Requires=sqldb.service memcached.service AssertPathExists=/srv/www @@ -2653,7 +2655,7 @@ PrivateTmp=yes /etc/systemd/system/failure-handler@.service: [Unit] -Description=My failure handler for %i +Description=My Failure Handler For %i [Service] Type=oneshot -- 2.47.3