From a206cfdb9cb08bbf85096ffc0448be35f2fb0253 Mon Sep 17 00:00:00 2001 From: niten Date: Mon, 27 Nov 2023 16:59:34 -0800 Subject: [PATCH] Don't start snooper til network is available. Also, restart on failure, but wait a bit. --- module.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module.nix b/module.nix index 72b669a..93fb39f 100644 --- a/module.nix +++ b/module.nix @@ -77,8 +77,11 @@ in { systemd.services.snooper = { path = [ snooper-server ]; wantedBy = [ "multi-user.target" ]; + after = [ "network-online.target" ]; serviceConfig = { DynamicUser = true; + Restart = "on-failure"; + RestartSec = "120s"; LoadCredential = [ "mqtt-incoming.passwd:${cfg.mqtt.incoming.password-file}" "mqtt-outgoing.passwd:${cfg.mqtt.outgoing.password-file}"