I have ejabberd all setup and running great, but my only problem is I need a way to start it automatically when the server starts. I currently use a bash script that runs this:
erl -pa /var/lib/ejabberd/ebin \
-sname ejabberd \
-s ejabberd \
-ejabberd config \"/etc/ejabberd/ejabberd.cfg\" \
log_path \"/var/log/ejabberd/ejabberd.log\" \
-sasl sasl_error_logger \{file,\"/var/log/ejabberd/sasl.log\"\} \
-mnesia dir \"/var/lib/ejabberd/spool\"
That works fine but it locks me in the Erl command line and I don't know how to get out of that without killing it (ctrl-c). I have been running it within a screen for now but that is kind of a hacked solution. I tried doing a "nohup command.sh &" which starts the server fine but then it dies after about 30 seconds or so. I then had to FG the process which basically puts me in the same situation as before.
Is there some way that I can run this in a non-interactive environment so it runs just like a regular *nix daemon?
Would appreciate any comments/suggestions.
Thanks,
Paul
Answer found elsewhere in forums..
I was finally able to find the solution to this problem at the following link:
http://www.ejabberd.im/node/586
(adding -detached to the startup fixed it)