Fix hanging on maddy update
This commit is contained in:
parent
c41c05f45a
commit
1820b0f958
|
@ -18,6 +18,8 @@ in
|
||||||
options.cloud.mail = {
|
options.cloud.mail = {
|
||||||
enable = mkEnableOption "Enable the email server";
|
enable = mkEnableOption "Enable the email server";
|
||||||
|
|
||||||
|
debug = mkEnableOption "Enable debugging";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.maddy;
|
default = pkgs.maddy;
|
||||||
|
@ -275,7 +277,7 @@ in
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
NotifyAccess = "main";
|
NotifyAccess = "exec";
|
||||||
|
|
||||||
User = name;
|
User = name;
|
||||||
Group = name;
|
Group = name;
|
||||||
|
@ -335,9 +337,13 @@ in
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
# ... Unless it is a configuration problem.
|
# ... Unless it is a configuration problem.
|
||||||
RestartPreventExitStatus = 2;
|
RestartPreventExitStatus = 2;
|
||||||
|
|
||||||
|
ExecStart = "${cfg.package}/bin/maddy ${if cfg.debug then "-debug " else ""}-config ${configFile}";
|
||||||
};
|
};
|
||||||
script = "${cfg.package}/bin/maddy -config ${configFile}";
|
reload = ''
|
||||||
reload = "/bin/kill -USR1 $MAINPID";
|
/bin/kill -USR1 $MAINPID
|
||||||
|
/bin/kill -USR2 $MAINPID
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
sops.secrets.mail-users = { owner = "maddy"; };
|
sops.secrets.mail-users = { owner = "maddy"; };
|
||||||
cloud.mail = {
|
cloud.mail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
debug = true;
|
||||||
tls.certFile = "${config.cloud.traefik.certsDumper.destination}/${config.cloud.mail.hostname}/certificate.crt";
|
tls.certFile = "${config.cloud.traefik.certsDumper.destination}/${config.cloud.mail.hostname}/certificate.crt";
|
||||||
tls.keyFile = "${config.cloud.traefik.certsDumper.destination}/${config.cloud.mail.hostname}/privatekey.key";
|
tls.keyFile = "${config.cloud.traefik.certsDumper.destination}/${config.cloud.mail.hostname}/privatekey.key";
|
||||||
usersFile = config.sops.secrets.mail-users.path;
|
usersFile = config.sops.secrets.mail-users.path;
|
||||||
|
|
Loading…
Reference in a new issue