boot script from escript file

Roberto Ostinelli roberto@REDACTED
Thu Apr 8 18:35:08 CEST 2010


dear list,

i'm starting an application in a new erlang node with run_erl like this:

run_erl -daemon var/pipe/icrocco@REDACTED var/logs "exec erl +P 1000000
+K true -name icrocco@REDACTED -setcookie srthoius5eoisurtoiunshrt -pa
ebin -boot icrocco_rel-0.1"

from bash, everything works perfectly.

if however i run the same script from an escript file:

#!/usr/bin/env escript
%% -*- erlang -*-
%%! -smp enable debug verbose

-mode(compile).
-vsn('0.1').

main(["start"]) ->
    Command = "run_erl -daemon var/pipe/icrocco@REDACTED var/logs
\"exec erl +P 1000000 +K true -name icrocco@REDACTED -setcookie
srthoius5eoisurtoiunshrt -pa ebin -boot icrocco_rel-0.1\"",
    os:cmd(Command).


in this case the node is not started and i see in the log:

=====
===== LOGGING STARTED Thu Apr  8 18:29:05 CEST 2010
=====
{"init terminating in do_boot",{badarg,[{erlang,list_to_atom,[[<<15
bytes>>,<<1 byte>>,46,98,111,111,116]]},{init,get_boot,2},{init,do_boot,3}]}}

(no error logger present) error: "Error in process <0.1.0> with exit
value: {badarg,[{erlang,list_to_atom,[[<<15 bytes>>,<<1
byte>>,46,98,111,111,116]]},{init,get_boot,2},{init,do_boot,3}]}\n"


anyone can kindly tell me what i am doing wrong?

thank you in advance,

r.


More information about the erlang-questions mailing list