[ejabberd] Improvements in ejabberd start script - this proposal needs review
badlop at gmail.com
Fri Aug 24 22:14:34 MSD 2007
I applied most of your changes. I'll publish a new version when I
finish to review all the proposals.
2007/8/21, Sander Devrieze <s.devrieze at pandora.be>:
> See also http://ejabberd.jabber.ru/node/1117#features
* Something at host is not needed anymore
* Automatic touching of logs, when you delete these files when
they are too big, they are automatically created again when you
Is it needed? I think ejabberd already generates them if not present.
* Start ejabberd
Done: ejabberdctl start
* Open an Erlang console
Done: ejabberdctl debug, or live
* ejabberdctl configuration file with help inside
* Option to see the ejabberdctl configuration file
Not much interesting.
* ejabberd.inetrc included to bypass a bug in some Erlang versions
* Verifies permissions and the existence of ejabberd.cfg
Not much interesting: make install will already create dirs, seet
> Can you move the exporting of some of the variables to the script
> instead of the config file, I know you copied this from my script and
> Other minor improvements:
> 1) PROCESSES="+P 32768"
> -->Allow people to just enter the number like this:
> In the script you first have to create a new variable using this one
> (not tested):
> PROCESSES2="+P "$PROCESSES
> 2) #POLL="-K true"
> -->Replace with this:
> POLLING=yes (or no)
> In the script:
> Use an if or case construction to create the POLL variable using the
> value of the POLLING variable.
> 3) ERL_MAX_ETS_TABLES="-env ERL_MAX_ETS_TABLES 1400"
> -->same comment as for PROCESSES, maybe also make the naming of the
> variable easier
> Other comments:
> * it seems you didn't added the host detection during configuration?
There's a detection of which is preferable -name or -sname, copied from Debian.
> * you call the file ejabberdctl.template, why not ejabberdctl.in?
> AFAIK this is the common naming for files that are changed by the
> configure script.
Just a matter of taste: Makefile.in is parsed to build Makefile.
However, our .template files are not parsed, they are just copied to
somewhere in root dirs.
> * to display the help text you use multiple echo commands, you can
> replace this by a cat command (see e.g.
> http://flits102-126.flits.rug.nl/~dirk-jan/linux/inbellen/ppp.html )
It is a nice trick to reduce the size of the file. However, it is not
that common, and I want this script to be as easy to understand as
> * a configtest option for th script would be nice (see apachectl configtest)
Yes. This is tracked here:
Maybe it can be included in a future revision.
> > /sbin/ejabberdctl - Start and administration script
> Should be /usr/sbin/ejabberdctl
> > # ejabberdctl
> > RPC failed on the node ejabberd at localhost: nodedown
> Can't the help be displayed, just all apachectl?
The help is displayed when it is useful.
> > Examples:
> > ejabberdctl restart
> > ejabberdctl --node ejabberd at host restart
> Is this "--node ejabberd at host" necessary? Isn't this configured in the
> ejabberdctl config file?
It is optional, read the output. Those are just examples.
More information about the ejabberd