diff options
author | Marcel <me@m4rc3l.de> | 2024-02-17 19:46:53 +0100 |
---|---|---|
committer | Marcel <me@m4rc3l.de> | 2024-03-01 10:45:12 +0100 |
commit | 896a4d62d8c7e36ef19e2d40b6cc26adcc89fe03 (patch) | |
tree | 8af7d0dc512b41aecd70ee3f95ed2fdc57a140b6 /nixos/modules | |
parent | 333ad51f5c7ee6f8d72f7194a95e473becaf90a0 (diff) | |
download | nixlib-896a4d62d8c7e36ef19e2d40b6cc26adcc89fe03.tar nixlib-896a4d62d8c7e36ef19e2d40b6cc26adcc89fe03.tar.gz nixlib-896a4d62d8c7e36ef19e2d40b6cc26adcc89fe03.tar.bz2 nixlib-896a4d62d8c7e36ef19e2d40b6cc26adcc89fe03.tar.lz nixlib-896a4d62d8c7e36ef19e2d40b6cc26adcc89fe03.tar.xz nixlib-896a4d62d8c7e36ef19e2d40b6cc26adcc89fe03.tar.zst nixlib-896a4d62d8c7e36ef19e2d40b6cc26adcc89fe03.zip |
listmonk: ensure correct application of data migration
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/mail/listmonk.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/services/mail/listmonk.nix b/nixos/modules/services/mail/listmonk.nix index 945eb436c1f2..d6399304cc10 100644 --- a/nixos/modules/services/mail/listmonk.nix +++ b/nixos/modules/services/mail/listmonk.nix @@ -187,7 +187,11 @@ in { # Indeed, it will try to create all the folders and realize one of them already exist. # Therefore, we have to create it ourselves. ''${pkgs.coreutils}/bin/mkdir -p "''${STATE_DIRECTORY}/listmonk/uploads"'' - "${cfg.package}/bin/listmonk --config ${cfgFile} --idempotent --install --upgrade --yes" + # setup database if not already done + "${cfg.package}/bin/listmonk --config ${cfgFile} --idempotent --install --yes" + # apply db migrations (setup and migrations can not be done in one step + # with "--install --upgrade" listmonk ignores the upgrade) + "${cfg.package}/bin/listmonk --config ${cfgFile} --upgrade --yes" "${updateDatabaseConfigScript}/bin/update-database-config.sh" ]; ExecStart = "${cfg.package}/bin/listmonk --config ${cfgFile}"; |