From 2b131c97bbaa53292d690a877f54c25d39dbeead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 25 Dec 2020 09:46:30 +0100 Subject: [PATCH] nixos/kresd: set .stopIfChanged = false Since version 5.2.0 there's non-empty stop phase: ExecStopPost=/usr/bin/env rm -f "/run/knot-resolver/control/%i" but it's perfectly OK to run that from a different version (and typically it's no-op anyway). Real-life example where this helps: https://github.com/NixOS/nixpkgs/issues/49528#issuecomment-747723198 --- nixos/modules/services/networking/kresd.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/networking/kresd.nix b/nixos/modules/services/networking/kresd.nix index 6f1c4c48b43..074830fc352 100644 --- a/nixos/modules/services/networking/kresd.nix +++ b/nixos/modules/services/networking/kresd.nix @@ -135,6 +135,8 @@ in { CacheDirectory = "knot-resolver"; CacheDirectoryMode = "0770"; }; + # We don't mind running stop phase from wrong version. It seems less racy. + systemd.services."kresd@".stopIfChanged = false; # Try cleaning up the previously default location of cache file. # Note that /var/cache/* should always be safe to remove.