summary refs log tree commit diff
path: root/host
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-02-26 16:25:20 +0100
committerRory& <root@rory.gay>2024-02-26 16:25:20 +0100
commitabe60c62a45eb10203ffac6c78d4f7b3acaef673 (patch)
tree4007db8e77a0b99d3b05ee911c4554400422ea94 /host
parentUse BusyBox for copying file, use relative paths. (diff)
downloadRory-Open-Architecture-abe60c62a45eb10203ffac6c78d4f7b3acaef673.tar.xz
Explicitly specify working directory.
Diffstat (limited to 'host')
-rwxr-xr-xhost/Rory-nginx/services/matrix/matrix-media-gate.nix4
1 files changed, 3 insertions, 1 deletions
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";