<div dir="ltr"><div dir="ltr">On Wed, Apr 14, 2021 at 1:42 PM Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Apr 14, 2021 at 1:35 PM Ulrich Windl<br>
<<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de" target="_blank">Ulrich.Windl@rz.uni-regensburg.de</a>> wrote:<br>
><br>
> Hi!<br>
><br>
> I have two services defined, one using ExecStart only, the other ExecStop only.<br>
> Then I discovered some asymmetry:<br>
> systemd is still starting the service with the ExecStop only, while the one with the ExecStart only never is stopped.<br>
><br>
> Is that intended, or do I have some configuration error in the ExecStart only service?<br>
><br>
> The units look like this:<br>
> # /usr/lib/systemd/system/dellcd-log-start.service<br>
> [Unit]<br>
> Description=Log Start on Dell LCD<br>
> Documentation=man:dellcd(1)<br>
> DefaultDependencies=no<br>
> After=local-fs.target<br>
> Before=sysinit.target<br>
> Requires=local-fs.target<br>
> ConditionPathExists=/usr/bin/...<br>
><br>
> [Service]<br>
> Type=oneshot<br>
> TimeoutSec=10<br>
> ExecStart=/usr/bin/...<br>
><br>
<br>
Type=oneshot services go from "starting" directly to "dead"; they are<br>
never active and so there is nothing to stop.<br></blockquote><div><br></div><div>Unless they have RemainAfterExit=yes. See e.g. nftables.service or systemd-user-sessions.service.</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>