diff --git a/dist/systemd/maddy.service b/dist/systemd/maddy.service index f1f93d5..069fdb1 100644 --- a/dist/systemd/maddy.service +++ b/dist/systemd/maddy.service @@ -68,6 +68,9 @@ LimitNOFILE=131072 # processes launched. LimitNPROC=512 -Restart=on-abnormal +# Restart server on any problem. +Restart=on-failure +# ... Unless it is a configuration problem. +RestartPreventExitStatus=2 ExecStart=/usr/bin/maddy diff --git a/dist/systemd/maddy@.service b/dist/systemd/maddy@.service index 704147f..31c47b0 100644 --- a/dist/systemd/maddy@.service +++ b/dist/systemd/maddy@.service @@ -62,6 +62,9 @@ LimitNOFILE=131072 # processes launched. LimitNPROC=512 -Restart=on-abnormal +# Restart server on any problem. +Restart=on-failure +# ... Unless it is a configuration problem. +RestartPreventExitStatus=2 ExecStart=/usr/bin/maddy -config /etc/maddy/%i.conf