summary refs log tree commit diff
diff options
context:
space:
mode:
authorIzorkin <izorkin@elven.pw>2021-02-14 21:10:54 +0300
committererictapen <justin.humm@posteo.de>2021-02-15 11:43:03 +0100
commite3a7270e3dd01891cefc37ae3a77351053660349 (patch)
treef25a42c1a859875b1e3596def760716ddb1c0e1e
parent4255954d972a67d2e50104cb4c72a0f22e1234dd (diff)
nixos/mastodon: fix mastodon-init-db script
-rw-r--r--nixos/modules/services/web-apps/mastodon.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix
index 4986dd2be53f8..37e5f7719b7b5 100644
--- a/nixos/modules/services/web-apps/mastodon.nix
+++ b/nixos/modules/services/web-apps/mastodon.nix
@@ -417,7 +417,7 @@ in {
 
     systemd.services.mastodon-init-db = lib.mkIf cfg.automaticMigrations {
       script = ''
-        if [ `psql mastodon -c \
+        if [ `psql ${cfg.database.name} -c \
                 "select count(*) from pg_class c \
                 join pg_namespace s on s.oid = c.relnamespace \
                 where s.nspname not in ('pg_catalog', 'pg_toast', 'information_schema') \