Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #68710
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Newsgroups | comp.os.linux.misc |
| Subject | Re: Systemd ... Pass CL Params to Pgm ? |
| Date | 2025-06-12 12:27 +0200 |
| Message-ID | <3mmqhlxcct.ln2@Telcontar.valinor> (permalink) |
| References | <kvSdnUB3_JBBGNf1nZ2dnZfqnPudnZ2d@giganews.com> <seeqhlxg92.ln2@Telcontar.valinor> <102e8cm$2k1ci$2@dont-email.me> |
On 2025-06-12 11:58, The Natural Philosopher wrote: > On 12/06/2025 09:07, Carlos E.R. wrote: > >> EnvironmentFile=-/etc/sysconfig/spamd > > You have a directory called /-etc ??? > No. The dash has a meaning in systemd parlance. I confess to not knowing what, so I asked chatgpt after looking perfunctorily at "https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html". This is the answer: In a **systemd** service file, the line: ``` EnvironmentFile=-/etc/sysconfig/spamd ``` includes a **dash (`-`)** before the path. This dash is **significant**βit tells `systemd` to **ignore** the file **if it does not exist**. ### Meaning of the dash: * `EnvironmentFile=/etc/sysconfig/spamd` β systemd **fails** to start the service if the file is missing. * `EnvironmentFile=-/etc/sysconfig/spamd` β systemd **ignores the missing file** and continues starting the service without error. ### Use case: This is helpful when the environment file is **optional** or only present in certain configurations or environments. ### Summary: The dash (`-`) before the path means: > *"Use this environment file if it exists; otherwise, proceed without it."* Let me know if you want a breakdown of how `EnvironmentFile` works with variables. -- Cheers, Carlos.
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
Systemd ... Pass CL Params to Pgm ? c186282 <c186282@nnada.net> - 2025-06-12 03:46 -0400
Re: Systemd ... Pass CL Params to Pgm ? Richard Kettlewell <invalid@invalid.invalid> - 2025-06-12 09:06 +0100
Re: Systemd ... Pass CL Params to Pgm ? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-12 09:14 +0000
Re: Systemd ... Pass CL Params to Pgm ? c186282 <c186282@nnada.net> - 2025-06-12 15:04 -0400
Re: Systemd ... Pass CL Params to Pgm ? "Carlos E.R." <robin_listas@es.invalid> - 2025-06-12 23:43 +0200
Re: Systemd ... Pass CL Params to Pgm ? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-12 21:57 +0000
Re: Systemd ... Pass CL Params to Pgm ? "Carlos E.R." <robin_listas@es.invalid> - 2025-06-13 00:58 +0200
Re: Systemd ... Pass CL Params to Pgm ? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-13 01:05 +0000
Re: Systemd ... Pass CL Params to Pgm ? c186282 <c186282@nnada.net> - 2025-06-12 23:59 -0400
Re: Systemd ... Pass CL Params to Pgm ? "Carlos E.R." <robin_listas@es.invalid> - 2025-06-12 10:07 +0200
Re: Systemd ... Pass CL Params to Pgm ? The Natural Philosopher <tnp@invalid.invalid> - 2025-06-12 10:58 +0100
Re: Systemd ... Pass CL Params to Pgm ? "Carlos E.R." <robin_listas@es.invalid> - 2025-06-12 12:27 +0200
Re: Systemd ... Pass CL Params to Pgm ? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-12 21:41 +0000
Re: Systemd ... Pass CL Params to Pgm ? "Carlos E.R." <robin_listas@es.invalid> - 2025-06-13 00:59 +0200
Re: Systemd ... Pass CL Params to Pgm ? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-13 01:06 +0000
Re: Systemd ... Pass CL Params to Pgm ? c186282 <c186282@nnada.net> - 2025-06-12 23:41 -0400
Re: Systemd ... Pass CL Params to Pgm ? candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-06-13 21:00 +0000
Re: Systemd ... Pass CL Params to Pgm ? rbowman <bowman@montana.com> - 2025-06-13 23:27 +0000
Re: Systemd ... Pass CL Params to Pgm ? Richard Kettlewell <invalid@invalid.invalid> - 2025-06-13 09:39 +0100
Re: Systemd ... Pass CL Params to Pgm ? "Carlos E.R." <robin_listas@es.invalid> - 2025-06-13 13:13 +0200
Re: Systemd ... Pass CL Params to Pgm ? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-13 23:38 +0000
Re: Systemd ... Pass CL Params to Pgm ? c186282 <c186282@nnada.net> - 2025-06-14 01:16 -0400
Re: Systemd ... Pass CL Params to Pgm ? "Carlos E.R." <robin_listas@es.invalid> - 2025-06-14 14:54 +0200
Re: Systemd ... Pass CL Params to Pgm ? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-14 23:28 +0000
Re: Systemd ... Pass CL Params to Pgm ? "Carlos E.R." <robin_listas@es.invalid> - 2025-06-16 12:24 +0200
Re: Systemd ... Pass CL Params to Pgm ? c186282 <c186282@nnada.net> - 2025-06-17 01:08 -0400
Re: Systemd ... Pass CL Params to Pgm ? Marc Haber <mh+usenetspam1118@zugschl.us> - 2025-06-13 07:29 +0200
Re: Systemd ... Pass CL Params to Pgm ? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-13 05:36 +0000
Re: Systemd ... Pass CL Params to Pgm ? Marc Haber <mh+usenetspam1118@zugschl.us> - 2025-06-13 08:48 +0200
Re: Systemd ... Pass CL Params to Pgm ? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-06-13 06:53 +0000
Re: Systemd ... Pass CL Params to Pgm ? Marc Haber <mh+usenetspam1118@zugschl.us> - 2025-06-13 10:05 +0200
csiph-web