[erlang-questions] Erlsrv

Michael Mileusnich <>
Tue Oct 11 15:36:01 CEST 2011


Thank you very much I will try when I get home

On Tue, Oct 11, 2011 at 4:20 AM, Robert Raschke <>wrote:

>
> On Mon, Oct 10, 2011 at 10:06 PM, Michael Mileusnich <
> > wrote:
>
>> Hello,
>>
>> Erlsrv looks very simple however I have tried many different combinations
>> of commands and cannot get my server to stay active or get accurate debug
>> information.  Could anybody provide me with what the command to form a
>> Windows service using Erlsrv with the following command:
>>
>> erl -pa ebin -run hqcontroller run -extra $DATA
>>
>> - My beam files are in the ebin folder
>>
>> Thanks,
>> Michael Mileusnich
>>
>>
> Something along these lines should work:
>
> set PATH=%ERLPATH%;%PATH%
>
> erlsrv add "MyService" ^
>     -internalservicename "MyService" ^
>     -sname "" ^
>     -stopaction "init:stop()." ^
>     -workdir "C:/MyWorkdir" ^
>     -args "-pa ebin -run hqcontroller run -extra %DATA%" ^
>     -env PATH="%PATH%"
>
> The important bit here is the -workdir option (not sure if you need -sname
> or -stopaction for your purposes), telling the service where it'll be
> running. Without that, you "-pa ebin" doesn't say much. And you better make
> sure your DATA env var is properly formatted/quoted, or you'll end up with
> lots of bizarreness.
>
> Robby
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111011/86e1fea9/attachment.html>


More information about the erlang-questions mailing list