Hi!
On Fri, Sep 26, 2014 at 01:26:52AM +0000, James Powell wrote:
> ejabberd services could be started as such. Here's a method you could
> use that I've deduced from the documentation to create an ejabberd
> service:
Did you actually tested this setup?
> cat > /etc/sv/ejabberd/run << "EOF"
> #!/bin/sh
> exec 2>&1
> exec ejabberdctl start
> EOF
This shouldn't work because `ejabberdctl start` run ejabbed in background
and exits immediately…
> cat > /etc/sv/ejabberd/finish << "EOF"
> #!/bin/sh
> exec ejabberdctl stop
> EOF
…and then this should result in stopping just-started-in-background ejabberd.
> cat > /etc/sv/ejabberd/log/run << "EOF"
> #!/bin/sh
> if [ -d /var/log/ejabber ]; then
> mkdir -p /var/log/ejabber
> fi
> exec svlogd -tt /var/log/ejabberd
> EOF
This shouldn't work - it will start, but won't write anything into log
because ejabberd started in background by `ejabberdctl start` won't output
anything to STDOUT but instead write into two files:
/var/log/jabber/erlang.log and /var/log/jabber/ejabberd.log.
At least that's true for ejabberdctl script in Gentoo Linux - I've no idea
is it vanilla or Gentoo-patched (I'll attach it, so you can compare it
with your own, just in case yours works differently). Another possible
reason is different versions of ejabberd - I'm using 2.1.13.
--
WBR, Alex.
Received on Fri Sep 26 2014 - 01:51:46 UTC