"An ExecStart= process belonging to unit UNIT has exited." with Type=oneshot systemd service

Hey there! I’m having some troubles with a systemd service that checks for “SecAdvisories” in rpm-ostree status and notifies the user if it is found.

journalctl --user -xfu check-sec-advisories.service

The command i execute works perfectly when executed directly in a shell.

What i don’t understand is the service is a oneshot type, but it fails with An ExecStart= process belonging to unit UNIT has exited..

Isn’t that exactly what a oneshot type service is supposed to do?
I’ve spent the whole morning trying to figure this out, so any help would be appreciated.

PS.: Sorry about the hacky /usr/bin/bash -c $COMMAND. The reason is that i am storing the service (and would store a script) in my home folder which makes hard coding the path non-portable. A better solution would be highly appreciated.

1 Like
1 Like

I see now that the problem was that a part of my script had an error that was passed on to systemd which made it fail, even though the rest of the script was executed properly.

1 Like