Store the pidfile elsewhere

This commit is contained in:
niten 2023-01-23 08:57:53 -08:00
parent 1798c85609
commit 0184969af8
1 changed files with 2 additions and 2 deletions

View File

@ -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"''
]);
};
};