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

Sander Devrieze s.devrieze at pandora.be
Sat Aug 25 03:53:20 MSD 2007

2007/8/25, Badlop <badlop at gmail.com>:
> 2007/8/21, Jeffrey C. Ollie <jeff at ocjtech.us>:
> > On Tue, 2007-08-21 at 17:11 +0200, Badlop wrote:
> > > ejabberd does not include an start script. Instead, some minimal
> > > instructions are available in the ejabberd Guide and in the examples/
> > > directory.
> > > For that reason, packagers for *nix distributions had to write their
> > > own custom start scripts. The Windows installers are not affected,
> > > because they include start and stop shortcuts.
> >
> > For reference, here are the ejabberd init script and ejabberdctl wrapper
> > script included with Fedora 7.
> Thanks for those examples.
> Both those scripts and the Debian ones start the Erlang virtual
> machine with a non-privileged user. I add this feature request to the
> ejabberd generic start script.

The difficult thing is that you need to create such a user first and
that this is not similar on all systems. This is why there are
packages for each system. My proposals:
* detect if the user is root with "whoami", if so abort the script and
show an error
* maybe (not sure about this) add an option to the configfile to
disable this check (e.g. ALLOWROOT=no)
* make it easy for packagers to change some setting so that the script
always is executed as another user

Mvg, Sander Devrieze.

More information about the ejabberd mailing list