From 0184969af8b100f8180ad89145d8248325a8a438 Mon Sep 17 00:00:00 2001 From: niten Date: Mon, 23 Jan 2023 08:57:53 -0800 Subject: [PATCH] Store the pidfile elsewhere --- objectifier-module.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objectifier-module.nix b/objectifier-module.nix index 1003189..5a96a1f 100644 --- a/objectifier-module.nix +++ b/objectifier-module.nix @@ -90,7 +90,7 @@ in { Restart = "on-failure"; RestartSec = "5s"; Type = "simple"; - PIDFile = "/run/objectifier.pid"; + PIDFile = ''"$RUNTIME_DIRECTORY/objectifier.pid"''; ExecStart = let bindClause = concatStringsSep " " (map (addr: "--bind ${addr}:${toString cfg.port}") @@ -99,7 +99,7 @@ in { "${pkgs.objectifier}/bin/objectifier" bindClause "--workers ${toString cfg.workers}" - "--pid /run/objectifier.pid" + ''--pid "$RUNTIME_DIRECTORY/objectifier.pid"'' ]); }; };