]> granicus.if.org Git - ejabberd/commitdiff
Let systemd stop ejabberd gracefully
authorHolger Weiss <holger@zedat.fu-berlin.de>
Wed, 19 Oct 2016 22:27:50 +0000 (00:27 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Wed, 19 Oct 2016 22:27:50 +0000 (00:27 +0200)
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.

ejabberd.service.template

index 560a93265263f15eeeb50fd6b50a2db97a1d0a70..a70d2254d7916255dc5422dac5d5002da641daec 100644 (file)
@@ -9,8 +9,8 @@ Group=ejabberd
 LimitNOFILE=65536
 Restart=on-failure
 RestartSec=5
-ExecStart=@ctlscriptpath@/ejabberdctl start
-ExecStop=@ctlscriptpath@/ejabberdctl stop
+ExecStart=/bin/sh -c '@ctlscriptpath@/ejabberdctl start && @ctlscriptpath@/ejabberdctl started'
+ExecStop=/bin/sh -c '@ctlscriptpath@/ejabberdctl stop && @ctlscriptpath@/ejabberdctl stopped'
 PrivateDevices=true
 ProtectSystem=full