[erlang-questions] erlsrv usage

Fri Aug 21 16:27:48 CEST 2009


Well... The "display name" will be ejabberd, but the internal windows name 
you see if you select "properties" will be ejabberd followed by some 
seemingly random numbers. It's not a bug, it's actually working as 
intended. The internal name never changes regardless of what the release 
handler in OTP does to the service (renames, creates new service with old 
name etc etc), why it needs to be unique and somewhat 
disconnected from the name erlsrv uses (which is also set as the windows 
"display name", which is what most users will ever see).

However, even if it's working as once intended, there is no harm in adding 
options for those who don't use the release handler and don't need to 
do the icky things the release_handler does. Therefore the erlsrv command 
will take two new options when registering a service beginning from 
-i <internal service name>
-c <comment>

The comment will show up as "Description" in the service manager and the 
"internal service name" will show up as "Service name" in the service 
manager's properties window.

-i can only be used when adding a service while -c can be used 
subsequently in the "erlsrv set" context to change the comment.

Changing your command to 
erlsrv add ejabberd -sname ejabberd-srv@REDACTED -w "C:\ejabberd-2.1.0\bin"
-ar "-s win_service" -st "win_service:stop()." -onfail restart -i ejabberd 
-c "Cool application"

will make it look nicer in service manager.

R13B02 will be out in a month or so, hope you can cope until then.

(just a note, do *not* use -i when registering a service that is to be 
managed by the OTP release_handler!)

On Tue, 18 Aug 2009, Christophe Romain wrote:

> Hi
> I use erlsrv for ejabberd to run as service under windows.
> the service is registered that way:
> erlsrv add ejabberd -sname ejabberd-srv@REDACTED -w "C:\ejabberd-2.1.0\bin" 
> -ar "-s win_service" -st "win_service:stop()." -onfail restart
> but the service name looks like: ejabberd01c9e46ae1733560
> (and not "ejabberd" as requested) is there a reason for that ?
> by the way, reading http://erlang.org/doc/man/erlsrv.html
> it seems it's not possible to define service description on command line.
> is there an undocumented way for setting service description ?
> Thanks!
> BR.
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org

More information about the erlang-questions mailing list