Expose systemd's RestartSec?

Here’s our use-case. Say you have a robot that runs a number of services, one of which is pulling frames from a USB camera. Occasionally there are power fluctuations or other real-life issues that causes the camera to disconnect temporarily, which causes the node pulling data from it to die. The service running the camera node has restart-always, and the camera will come back up after a few seconds, but by then the service will have reached systemd’s throttle limit and be down for good.

The workaround for this type of situation is to wrap the service and sleep for a few seconds so that the throttle isn’t reached, but if snapd exposed systemd’s RestartSec property this hack wouldn’t be required. Thoughts?

Yes.