mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-04 21:47:40 +03:00
dist: Use Restart=on-failure in systemd units
With RestartPreventExitStatus to prevent restart spam on configuration errors.
This commit is contained in:
parent
3593a0b7ae
commit
ff982cd1c3
2 changed files with 8 additions and 2 deletions
5
dist/systemd/maddy.service
vendored
5
dist/systemd/maddy.service
vendored
|
@ -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
|
||||
|
|
5
dist/systemd/maddy@.service
vendored
5
dist/systemd/maddy@.service
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue