dist: Use Restart=on-failure in systemd units

With RestartPreventExitStatus to prevent restart spam on configuration
errors.
This commit is contained in:
fox.cpp 2019-12-27 18:00:13 +03:00
parent 3593a0b7ae
commit ff982cd1c3
No known key found for this signature in database
GPG key ID: E76D97CCEDE90B6C
2 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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