ejabberd - Comments for "Service doesn&amp;#039;t start automatically in CentOS" https://www.ejabberd.im/node/4398 en I got this error: https://www.ejabberd.im/node/4398#comment-65150 <p>I got this error: /etc/init.d/ejabberd: line 29: $1: unbound variable</p> <p>any idea?</p> <p>thanks.</p> Wed, 26 Nov 2014 01:48:11 +0000 badai comment 65150 at https://www.ejabberd.im Related ticket: https://www.ejabberd.im/node/4398#comment-57388 <p>Related ticket: <noindex><a href="https://support.process-one.net/browse/EJAB-1450" title="https://support.process-one.net/browse/EJAB-1450" rel="nofollow" >https://support.process-one.net/browse/EJAB-1450</a></noindex></p> Tue, 24 May 2011 21:59:21 +0000 mfoss comment 57388 at https://www.ejabberd.im I returned to this issue https://www.ejabberd.im/node/4398#comment-57381 <p>I returned to this issue successfully.</p> <p>The init file doesn't support chkconfig because it's missing the required header:</p> <p><noindex><a href="http://www.linux.com/learn/tutorials/442412-managing-linux-daemons-with-init-scripts" title="http://www.linux.com/learn/tutorials/442412-managing-linux-daemons-with-init-scripts" rel="nofollow" >http://www.linux.com/learn/tutorials/442412-managing-linux-daemons-with-...</a></noindex></p> <p>Just adding the following to the beginning of ejabberd.init does the trick:</p> <p>#!/bin/sh<br /> #<br /> # ejabberd Startup script for the ejabberd XMPP Server<br /> #<br /> # chkconfig: - 99 10<br /> # description: ejabberd XMPP server</p> <p># Source function library.<br /> . /etc/init.d/functions</p> <p>set -o errexit<br /> ...</p> <p>The numbers after chkconfig are boot-up and shutdown priorities, they may need tunning but those seem safe. I don't think chkconfig is distro-specific, I'll ask ejabberd developers to add this to the distribution package.</p> <p>So after adding that to ejabberd.init, all that is left to do is:</p> <p>su<br /> cp ejabberd.init /etc/init.d/ejabberd<br /> chmod +x /etc/init.d/ejabberd<br /> /usr/sbin/groupadd -r ejabberd<br /> /usr/sbin/useradd -g ejabberd -p ejabberd -r ejabberd<br /> /sbin/chkconfig --add ejabberd<br /> /sbin/chkconfig ejabberd on</p> Mon, 23 May 2011 16:32:18 +0000 Ivan Martinez comment 57381 at https://www.ejabberd.im Boot sequences depend on distro. https://www.ejabberd.im/node/4398#comment-57024 <div class="quote-msg"> <div class="quote-author"><em>Ivan Martinez</em> wrote:</div> <p>I learned that in order to make Linux start ejabberd during boot I need to have a script in a /etc/rc?.d folder, but where do I get the script from?. Is it the same ejabberd.init I copied in /etc/init.d?. </p></div> <p>Depends on the Linux. That's true with Debian, the script goes in /etc/init.d/ and you place links in the /etc/rc? folders. Check the CentOS documentation, it's most likely a bit different since it's RH-based.</p> Sat, 29 Jan 2011 16:34:18 +0000 vesperto comment 57024 at https://www.ejabberd.im Accordingly to this https://www.ejabberd.im/node/4398#comment-56823 <p>Accordingly to this document:</p> <p><noindex><a href="http://www.cyberciti.biz/faq/rhel5-update-rcd-command/" title="http://www.cyberciti.biz/faq/rhel5-update-rcd-command/" rel="nofollow" >http://www.cyberciti.biz/faq/rhel5-update-rcd-command/</a></noindex></p> <p>the command for RedHat and CentOs is:</p> <p>chkconfig --add ejabberd</p> <p>but when I run it it says:</p> <p>service ejabberd does not support chkconfig</p> <p>I learned that in order to make Linux start ejabberd during boot I need to have a script in a /etc/rc?.d folder, but where do I get the script from?. Is it the same ejabberd.init I copied in /etc/init.d?.</p> <p>Thank you,<br /> Ivan Martinez</p> Fri, 19 Nov 2010 20:36:01 +0000 Ivan Martinez comment 56823 at https://www.ejabberd.im I know very little about this https://www.ejabberd.im/node/4398#comment-56813 <p>I know very little about this topic. Maybe you also have to run something like this:<br /> update-rc.d ejabberd defaults 65</p> Tue, 16 Nov 2010 19:13:57 +0000 mfoss comment 56813 at https://www.ejabberd.im