Service supervisors like daemontools or runit require service to be run in foreground, without forking to background. ejabberdctl has two options to run ejabberd: "start" (which force -detached param) and "live" (which doesn't force -detached), but right now neither is really suitable to be used with daemontools/runit. It looks like "live" can be used to run under daemontools/runit if we add few extra params (-noinput -sasl sasl_error_logger {file,"/var/log/jabber/erlang.log"}), but there is a bug in ejabberdctl script which prevent this: while all start-functions in that script (start(), debug() and live()) internally use "$@" when run actual command to start ejabberd, they're called without any params (so "$@" is always empty). At same time logic which parse ejabberdctl params stop at "--" param, so looks like it was supposed to provide extra params to start/debug/live. I think patch should be trivial, like: - ' start') start;; - ' debug') debug;; - ' live') live;; + ' start') start "$@";; + ' debug') debug "$@";; + ' live') live "$@";; Just for the reference, there is also another issue - I didn't find a way to use daemontools/runit standard loggers (multilog/svlogd) for ejabberd. Usually we replace log files with fifo (so service write to fifo while thinking it write to usual log file) and run extra service(s) which read from fifo and write actual logs. But AFAIK erlang doesn't support writing to fifo so this workaround doesn't work.
ejabberd-2.1 has been removed from the tree (see bug 539040). Please open a new bug if it occurs in >=ejabberd-16.