From 4fa1783c64dccdc7ddc11057894fe44c0b100aaa Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 6 Mar 2022 11:35:22 +0100 Subject: [PATCH] tinc: stopIfChanged = false instead of reload --- krebs/3modules/tinc.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/krebs/3modules/tinc.nix b/krebs/3modules/tinc.nix index 8fb8961c6..9e0688d75 100644 --- a/krebs/3modules/tinc.nix +++ b/krebs/3modules/tinc.nix @@ -242,7 +242,9 @@ with import ; cfg.iproutePackage cfg.tincPackage ]; - reloadIfChanged = true; + # Restart the service in a single step in order to prevent potential + # connection timeouts and subsequent issues while deploying via tinc. + stopIfChanged = false; serviceConfig = { Restart = "always"; LoadCredential = filter (x: x != "") [ @@ -270,7 +272,6 @@ with import ; "-o PrivateKeyFile=\${CREDENTIALS_DIRECTORY}/rsa_key" "--pidfile=/var/run/tinc.${netname}.pid" ]; - ExecReload = "${cfg.tincPackage}/sbin/tinc -n ${netname} restart"; SyslogIdentifier = netname; }; }) config.krebs.tinc;