systemd override drop in w ExecStart

Posted on Mar 23, 2023

I was using sudo systemctl edit <some_unit> to add an drop-in override. When I tried starting the service, I got the following erorr in the logs:

Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
  • I was unsure what’s up because clearly there’s just one ExecStart. Turns out the override and the original things are merged.
  • I also tried using systemctl cat <unit> and I got a warning as mentioned in this issue: systemd/systemd#13634 Invalid systemctl warning that source configuration (This is irrelevant, just wanted to mention)
  • So the final solution was to “clear” before the merge happens as explained by this answer: Why use ExecStart= (with no value)
  • So in the override file, I had to add

This is funny because the error tells me not to use more than one ExecStart and the solution infact was using multiple ExecStart

Man life is tough