[ejabberd] Improvements in ejabberd start script - this proposal needs review

Badlop 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

Done

    * Automatic touching of logs, when you delete these files when
they are too big, they are automatically created again when you
restart

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

Done: ejabberdctl.cfg

    * Option to see the ejabberdctl configuration file

Not much interesting.

    * ejabberd.inetrc included to bypass a bug in some Erlang versions

Done.

    * Verifies permissions and the existence of ejabberd.cfg

Not much interesting: make install will already create dirs, seet
permissions, etc.


> 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

Done

> Other minor improvements:
> 1) PROCESSES="+P 32768"
> -->Allow people to just enter the number like this:
> PROCESSES=32768
> In the script you first have to create a new variable using this one
> (not tested):
> PROCESSES2="+P "$PROCESSES

Done

> 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.

Done

> 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

Done

> 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
possible.

> * a configtest option for th script would be nice (see apachectl configtest)

Yes. This is tracked here:
https://support.process-one.net/browse/EJAB-51
Maybe it can be included in a future revision.

> >   /sbin/ejabberdctl - Start and administration script
>
> Should be /usr/sbin/ejabberdctl

Done.

> > # 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 mailing list