Hi Manfred,
you probably have figured it all out in the meantime…
I just needed command-line arguments myself, so I looked it up.
Maybe it will save some time for someone…
You could use init:get_arguments/0 or init:get_argument/1 for the job.
You pass command lines after <your_release> daemon, and
with get_arguments() you will receive all arguments commandline.
Or with get_argument(arg) you will get only this specific one.
io:format("all flags: ~p~n", [init:get_arguments()]),
$ bin/bumbelbee console -a a1 a2 -b b1 b2 b3 -longer trees grow slow
[..]
Erlang/OTP 25 [erts-13.1.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:30] [jit:ns]
all flags: [{root,["/home/dieter/plazground/BEAM/erlang/bumbelbee/_build/default/rel/bumbelbee"]},
{bindir,["/home/dieter/.asdf/installs/erlang/25.1.2/erts-13.1.2/bin"]},
{progname,["bumbelbee"]},
{home,["/home/dieter"]},
{kernel,["shell_history","enabled"]},
{boot,["/home/dieter/plazground/BEAM/erlang/bumbelbee/_build/default/rel/bumbelbee/releases/0.1.0/start"]},
{mode,["embedded"]},
{boot_var,["SYSTEM_LIB_DIR",
"/home/dieter/.asdf/installs/erlang/25.1.2/lib"]},
{config,["/home/dieter/plazground/BEAM/erlang/bumbelbee/_build/default/rel/bumbelbee/releases/0.1.0/sys.config"]},
{sname,["bumbelbee"]},
{setcookie,["bumbelbee_cookie"]},
{a,["a1","a2"]},
{b,["b1","b2","b3"]},
{longer,["trees","grow","slow"]}]