From abe60c62a45eb10203ffac6c78d4f7b3acaef673 Mon Sep 17 00:00:00 2001 From: Rory& Date: Mon, 26 Feb 2024 16:25:20 +0100 Subject: Explicitly specify working directory. --- host/Rory-nginx/services/matrix/matrix-media-gate.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/host/Rory-nginx/services/matrix/matrix-media-gate.nix b/host/Rory-nginx/services/matrix/matrix-media-gate.nix index 8c92a4c..a81d7a4 100755 --- a/host/Rory-nginx/services/matrix/matrix-media-gate.nix +++ b/host/Rory-nginx/services/matrix/matrix-media-gate.nix @@ -11,6 +11,7 @@ RestartSec = "5"; DynamicUser = true; StateDirectory = "matrix-media-gate"; + WorkingDirectory = "/var/lib/matrix-media-gate"; }; environment = { "DOTNET_ENVIRONMENT" = "matrix-rory-gay"; @@ -21,11 +22,12 @@ wantedBy = [ "multi-user.target" ]; serviceConfig = { ExecStart = "${MatrixMediaGate}/bin/MatrixMediaGate"; - ExecStartPre = "cp ${./appsettings.conduit-rory-gay.json} ./appsettings.conduit-rory-gay.json"; + ExecStartPre = "${pkgs.busybox}/bin/cp ${./appsettings.conduit-rory-gay.json} ./appsettings.conduit-rory-gay.json"; Restart = "always"; RestartSec = "5"; DynamicUser = true; StateDirectory = "matrix-media-gate"; + WorkingDirectory = "/var/lib/matrix-media-gate"; }; environment = { "DOTNET_ENVIRONMENT" = "conduit-rory-gay"; -- cgit 1.4.1