Use systemd notify socket to report process status

It has all sorts of benefits due to the service manager being aware of
the starting/running/stopping state, see systemd.service(5)

On top of that, start-up errors are reported using STATUS= key, so they
will be easier to see in the 'systemctl status' output.
This commit is contained in:
fox.cpp 2019-11-21 23:58:06 +03:00
parent cd514fd91a
commit 974dd3c7f8
No known key found for this signature in database
GPG key ID: E76D97CCEDE90B6C
7 changed files with 141 additions and 3 deletions

View file

@ -6,6 +6,9 @@ Documentation=https://github.com/foxcpp/maddy/wiki
After=network.target
[Service]
Type=notify
NotifyAccess=main
# For systemd before 235. Assumes pre-existing user & group.
User=maddy
Group=maddy

View file

@ -3,6 +3,9 @@ Description=maddy mail server (using %i.conf)
After=network.target
[Service]
Type=notify
NotifyAccess=main
# For systemd before 235. Assumes pre-existing user & group.
User=maddy
Group=maddy