From: Holger Weiss Date: Wed, 19 Oct 2016 22:27:50 +0000 (+0200) Subject: Let systemd stop ejabberd gracefully X-Git-Tag: 16.12-beta1~15^2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1bdbe54442098ed4c54219de834f22109a4e9868;p=ejabberd 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. --- diff --git a/ejabberd.service.template b/ejabberd.service.template index 560a93265..a70d2254d 100644 --- a/ejabberd.service.template +++ b/ejabberd.service.template @@ -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