From 2ca92f68f72a527fa002eb2e025c42913c5b280f Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 22 Aug 2022 20:08:09 -0500 Subject: [PATCH] r/frigate: Restart service if it fails Sometimes, Frigate crashes in situations that should be recoverable or temporary. For example, it will fail to start if the MQTT server is unreachable initially, and does not attempt to connect more than once. To avoid having to manually restart the service once the MQTT server is ready, we can configure the systemd unit to enable automatic restarts. --- roles/frigate/templates/frigate.service.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/frigate/templates/frigate.service.j2 b/roles/frigate/templates/frigate.service.j2 index dc7a956..ede091f 100644 --- a/roles/frigate/templates/frigate.service.j2 +++ b/roles/frigate/templates/frigate.service.j2 @@ -26,6 +26,7 @@ ExecStart=/usr/bin/podman run \ --shm-size {{ frigate_shm_size }}m \ {% endif %} docker.io/blakeblackshear/frigate:{{ frigate_image_tag }} +Restart=always ProtectSystem=full {% if ansible_distribution == 'Fedora' and ansible_distribution_version|int >= 36 %} TemporaryFileSystem=/etc/containers/networks