mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-25 21:44:49 +00:00
nixos/photoprism: use nsenter to call photoprism bin with correct UID and PID
This commit is contained in:
parent
58c2a31a59
commit
bb40443e77
@ -18,6 +18,9 @@ let
|
||||
in
|
||||
pkgs.writeShellScript "manage" ''
|
||||
${setupEnv}
|
||||
eval "$(${config.systemd.package}/bin/systemctl show -pUID,MainPID photoprism.service | ${pkgs.gnused}/bin/sed "s/UID/ServiceUID/")"
|
||||
exec ${pkgs.util-linux}/bin/nsenter \
|
||||
-t $MainPID -m -S $ServiceUID -G $ServiceUID --wdns=${cfg.storagePath} \
|
||||
exec ${cfg.package}/bin/photoprism "$@"
|
||||
'';
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user