From 902dd35d47d5ab62345f2e17537818cc69cc5cb9 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sat, 9 Jan 2016 18:16:29 +0300 Subject: [PATCH] nixos/postfix: move scripts to serviceConfig --- nixos/modules/services/mail/postfix.nix | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix index cbce53a1727d..9c3c77450215 100644 --- a/nixos/modules/services/mail/postfix.nix +++ b/nixos/modules/services/mail/postfix.nix @@ -410,6 +410,9 @@ in Type = "forking"; Restart = "always"; PIDFile = "/var/lib/postfix/queue/pid/master.pid"; + ExecStart = "${pkgs.postfix}/bin/postfix -c /etc/postfix start"; + ExecStop = "${pkgs.postfix}/bin/postfix -c /etc/postfix stop"; + ExecReload = "${pkgs.postfix}/bin/postfix -c /etc/postfix reload"; }; preStart = '' @@ -443,19 +446,6 @@ in ${pkgs.coreutils}/bin/chmod a+rwxt /var/spool/mail ${pkgs.coreutils}/bin/ln -sf /var/spool/mail /var/ ''; - - script = '' - ${pkgs.postfix}/sbin/postfix -c /etc/postfix start - ''; - - reload = '' - ${pkgs.postfix}/sbin/postfix -c /etc/postfix reload - ''; - - preStop = '' - ${pkgs.postfix}/sbin/postfix -c /etc/postfix stop - ''; - }; };