I have a rebar application called pingpong. After rebar generate I start the packaged application using ./rel/pingpong/bin/pingpong start. The problem is that the erlang VM always has the name -name [email protected] but what I want is to start the application once with the name [email protected] and then again with the name [email protected].
I know that the name stays in ./rel/pingpong/releases/VSN/vm.config but I don't want to manually edit the file before starting the application. I want something like pingpong start -name=ping. Is there a way to achieve this?
You can edit the bin/pingpong script to something like thist:
Instead of
set:
in this way you will be able to override node name from the command line:
For console/start command:
Find a line in yout startup script:
Add $NAME_ARG at the end:
And don't forget to remove -name NAME from your .args files