mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
Merge pull request #298168 from ambroisie/improve-tandoor-recipes-manage
nixos/tandoor-recipes: improve manage script
This commit is contained in:
commit
63078e3468
@ -20,7 +20,10 @@ let
|
||||
manage = pkgs.writeShellScript "manage" ''
|
||||
set -o allexport # Export the following env vars
|
||||
${lib.toShellVars env}
|
||||
exec ${pkg}/bin/tandoor-recipes "$@"
|
||||
eval "$(${config.systemd.package}/bin/systemctl show -pUID,GID,MainPID tandoor-recipes.service)"
|
||||
exec ${pkgs.util-linux}/bin/nsenter \
|
||||
-t $MainPID -m -S $UID -G $GID \
|
||||
${pkg}/bin/tandoor-recipes "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
@ -82,6 +85,7 @@ in
|
||||
Restart = "on-failure";
|
||||
|
||||
User = "tandoor_recipes";
|
||||
Group = "tandoor_recipes";
|
||||
DynamicUser = true;
|
||||
StateDirectory = "tandoor-recipes";
|
||||
WorkingDirectory = "/var/lib/tandoor-recipes";
|
||||
|
Loading…
Reference in New Issue
Block a user