nixos/tandoor-recipes: fix database management script
UID is a read-only shell variable. Lowercase shell variables are used to avoid this conflict.
This commit is contained in:
@@ -24,9 +24,10 @@ let
|
||||
manage = pkgs.writeShellScript "manage" ''
|
||||
set -o allexport # Export the following env vars
|
||||
${lib.toShellVars env}
|
||||
eval "$(${config.systemd.package}/bin/systemctl show -pUID,GID,MainPID tandoor-recipes.service)"
|
||||
# UID is a read-only shell variable
|
||||
eval "$(${config.systemd.package}/bin/systemctl show -pUID,GID,MainPID tandoor-recipes.service | tr '[:upper:]' '[:lower:]')"
|
||||
exec ${pkgs.util-linux}/bin/nsenter \
|
||||
-t $MainPID -m -S $UID -G $GID --wdns=${env.MEDIA_ROOT} \
|
||||
-t $mainpid -m -S $uid -G $gid --wdns=${env.MEDIA_ROOT} \
|
||||
${pkg}/bin/tandoor-recipes "$@"
|
||||
'';
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user