Don't start snooper til network is available.

Also, restart on failure, but wait a bit.
This commit is contained in:
niten 2023-11-27 16:59:34 -08:00
parent ade2e1caa0
commit a206cfdb9c
1 changed files with 3 additions and 0 deletions

View File

@ -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}"