From bba55b5182bce753708b251665a46a7d6ddc1a40 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 21 Jan 2024 15:48:15 -0600 Subject: [PATCH] r/unifi: Enable service auto restart Automatically restart the UniFi service in case it crashes (which it tends to do quite frequently). --- roles/unifi/tasks/deploy.yml | 2 +- roles/unifi/templates/unifi.container.j2 | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/unifi/tasks/deploy.yml b/roles/unifi/tasks/deploy.yml index 45d7f6a..64e7f7d 100644 --- a/roles/unifi/tasks/deploy.yml +++ b/roles/unifi/tasks/deploy.yml @@ -54,7 +54,7 @@ - reload systemd - restart unifi tags: - - systemd + - container - name: flush_handlers meta: flush_handlers diff --git a/roles/unifi/templates/unifi.container.j2 b/roles/unifi/templates/unifi.container.j2 index ecb2569..b15ead5 100644 --- a/roles/unifi/templates/unifi.container.j2 +++ b/roles/unifi/templates/unifi.container.j2 @@ -13,6 +13,7 @@ VolatileTmp=yes Notify=yes [Service] +Restart=always PrivateTmp=yes ProtectClock=yes ProtectHome=yes