Let systemd stop ejabberd gracefully

Make sure the "ExecStop" command line blocks until ejabberd is actually
stopped.  This prevents systemd from killing the ejabberd process(es)
immediately.

Also, let the "ExecStart" command line block until ejabberd's startup is
completed.  This makes sure that services which depend on ejabberd
aren't started up too early.
This commit is contained in:
Holger Weiss 2016-10-20 00:27:50 +02:00
parent a5e737157c
commit 1bdbe54442
1 changed files with 2 additions and 2 deletions

View File

@ -9,8 +9,8 @@ Group=ejabberd
LimitNOFILE=65536 LimitNOFILE=65536
Restart=on-failure Restart=on-failure
RestartSec=5 RestartSec=5
ExecStart=@ctlscriptpath@/ejabberdctl start ExecStart=/bin/sh -c '@ctlscriptpath@/ejabberdctl start && @ctlscriptpath@/ejabberdctl started'
ExecStop=@ctlscriptpath@/ejabberdctl stop ExecStop=/bin/sh -c '@ctlscriptpath@/ejabberdctl stop && @ctlscriptpath@/ejabberdctl stopped'
PrivateDevices=true PrivateDevices=true
ProtectSystem=full ProtectSystem=full