nixos/mastodon: fix mastodon-init-db script

This commit is contained in:
Izorkin 2021-02-14 21:10:54 +03:00 committed by erictapen
parent 4255954d97
commit e3a7270e3d

View file

@ -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') \