I am trying to make a systemd file that will monitor a service and restart it if it crashes. Here's the tricky part: If the service crashes more than 5 times in a minute, I want to mark it as failed and stop trying to automatically restart it. With Upstart, this was easily done with "respawn limit."
Systemd can rate-limit the automatic restarting with StartLimitIntervalSec, but that's not what I want. I don't want to merely rate-limit the restarting, but rather give up entirely if the limit gets hit.