From 4dd61b6e68ad858006afcad21558930f597cbc5c Mon Sep 17 00:00:00 2001 From: networkException Date: Fri, 15 Dec 2023 23:13:37 +0100 Subject: [PATCH] nixos/mastodon: properly escape arguments to psql in init-db script --- nixos/modules/services/web-apps/mastodon.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix index 7b00ce35eb1a..40219edcd447 100644 --- a/nixos/modules/services/web-apps/mastodon.nix +++ b/nixos/modules/services/web-apps/mastodon.nix @@ -711,31 +711,28 @@ in { systemd.services.mastodon-init-db = lib.mkIf cfg.automaticMigrations { script = lib.optionalString (!databaseActuallyCreateLocally) '' umask 077 - - export PGPASSFILE - PGPASSFILE=$(mktemp) - cat > $PGPASSFILE <