fix: run manage in service directory

for everything else it will error on CHDIR, even if $PWD has the right owner and permissions.
This commit is contained in:
Valentin Gagarin 2025-03-18 09:52:14 +01:00
parent 98c4490b4e
commit 8f0bcc35f0

View file

@ -58,13 +58,13 @@ let
text = text =
'' ''
systemd-run --pty \ systemd-run --pty \
--same-dir \
--wait \ --wait \
--collect \ --collect \
--service-type=exec \ --service-type=exec \
--unit "manage-${name}.service" \ --unit "manage-${name}.service" \
--property "User=${name}" \ --property "User=${name}" \
--property "Group=${name}" \ --property "Group=${name}" \
--property "WorkingDirectory=/var/lib/${name}" \
--property "Environment=DATABASE_URL=${database-url} USER_SETTINGS_FILE=${configFile}" \ --property "Environment=DATABASE_URL=${database-url} USER_SETTINGS_FILE=${configFile}" \
'' ''
+ optionalString (credentials != [ ]) ( + optionalString (credentials != [ ]) (