On Mon, Apr 24, 2023 at 09:29:46AM +0200, [email protected] wrote: > On Mon, Apr 24, 2023 at 08:45:16AM +0200, john doe wrote: > > On 4/23/23 18:41, [email protected] wrote: > > > $ cat /etc/systemd/system/stunnel.service > > > [Unit] > > > Description=StunnelStarter > > > Documentation=man:stunnel(8) > > > After=network.target auditd.service > > > > > > [Service] > > > ExecStart=/usr/bin/stunnel /etc/stunnel/stunnel.conf foreground=yes > > > > I'm not sure about the forground option if you want a daemon in the > > background! :) > > Under systemd, foreground is the new background! > > (No, seriously: AFAIU that's how it's supposed to be done with > systemd, because that's how it does its process monitoring and > log munging. Do take this with some fists of salt, as my systemd > knowledge is purely theoretical. Ask an expert)
You're correct. Whenever possible, the goal is to ExecStart a single foreground process which is your service. If you can do that, then you have a "simple" service type. If you cannot, then you probably have a "forking" service type, and systemd has to track a whole bunch of processes instead of just one.

