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.
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