25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

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

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