diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-06-11 21:44:06 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2010-06-11 21:44:06 +0000 |
commit | b25771532af934ea18589f237cfa57da2430fea4 (patch) | |
tree | 83424c2a12da184a1037208b90e3c38068546c85 /modules/services/mail | |
parent | dadd6d63e760ef5e3cbb57c3f9fbd5ea01f22024 (diff) | |
download | nixlib-b25771532af934ea18589f237cfa57da2430fea4.tar nixlib-b25771532af934ea18589f237cfa57da2430fea4.tar.gz nixlib-b25771532af934ea18589f237cfa57da2430fea4.tar.bz2 nixlib-b25771532af934ea18589f237cfa57da2430fea4.tar.lz nixlib-b25771532af934ea18589f237cfa57da2430fea4.tar.xz nixlib-b25771532af934ea18589f237cfa57da2430fea4.tar.zst nixlib-b25771532af934ea18589f237cfa57da2430fea4.zip |
Fixing the postfix start/stop (through an upstart job script code that will
monitor the life of postfix) Adding an assert to upstart jobs, so those with preStop will always need an exec or script, otherwise the preStop will not be run. svn path=/nixos/trunk/; revision=22225
Diffstat (limited to 'modules/services/mail')
-rw-r--r-- | modules/services/mail/postfix.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/services/mail/postfix.nix b/modules/services/mail/postfix.nix index 939260632c9b..03c77885d069 100644 --- a/modules/services/mail/postfix.nix +++ b/modules/services/mail/postfix.nix @@ -287,7 +287,15 @@ in daemonType = "none"; - respawn = false; + respawn = true; + + script = '' + while ${pkgs.procps}/bin/ps `${pkgs.coreutils}/bin/cat /var/postfix/queue/pid/master.pid` | + grep -q postfix + do + ${pkgs.coreutils}/bin/sleep 1m + done + ''; preStart = '' |