about summary refs log tree commit diff
path: root/nixos/modules/services/mail/dspam.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-03-21 18:18:54 +0300
committerNikolay Amiantov <ab@fmap.me>2016-03-27 19:23:01 +0300
commitea5c7d553c0f43a971fe75216b595a31dc80af94 (patch)
tree9c9bb457ae13d4df629bee30f421dcb82b7096bb /nixos/modules/services/mail/dspam.nix
parenta7e280b0f46a8d7bd860c3d1acf6ccf0091ca070 (diff)
dspam service: run after postgresql to prevent segfaults
Diffstat (limited to 'nixos/modules/services/mail/dspam.nix')
-rw-r--r--nixos/modules/services/mail/dspam.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/mail/dspam.nix b/nixos/modules/services/mail/dspam.nix
index 46e6f216b21e4..89076ff054620 100644
--- a/nixos/modules/services/mail/dspam.nix
+++ b/nixos/modules/services/mail/dspam.nix
@@ -104,6 +104,7 @@ in {
       systemd.services.dspam = {
         description = "dspam spam filtering daemon";
         wantedBy = [ "multi-user.target" ];
+        after = [ "postgresql.service" ];
         restartTriggers = [ cfgfile ];
 
         serviceConfig = {
@@ -114,7 +115,7 @@ in {
           RuntimeDirectoryMode = optional (cfg.domainSocket == defaultSock) "0750";
           PermissionsStartOnly = true;
           # DSPAM segfaults on just about every error
-          Restart = "on-failure";
+          Restart = "on-abort";
           RestartSec = "1s";
         };