[erlang-questions] Problems stop/attach a release
Khitai Pang
khitai.pang@REDACTED
Tue Mar 22 05:49:56 CET 2016
On 2016/3/22 3:21, Roger Lipscombe wrote:
> On 21 March 2016 at 19:00, Khitai Pang <khitai.pang@REDACTED> wrote:
>> The only difference is the vm.args file. It seems that the script
>> _rel/myapp/bin/myapp just won't work if there's no -setcookie in vm.args.
> Building an {extended_start_script,true} script with relx version
> 1.0.4 (I've not tried anything newer) gives you a script that
> explicitly checks for -setcookie in vm.args:
>
> # Extract the target cookie
> COOKIE_ARG="$(grep '^-setcookie' "$VMARGS_PATH")"
> if [ -z "$COOKIE_ARG" ]; then
> echo "vm.args needs to have a -setcookie parameter."
> exit 1
> fi
>
> # Extract cookie name from COOKIE_ARG
> COOKIE="$(echo "$COOKIE_ARG" | awk '{print $2}')"
>
> That reports the problem and quits. Maybe the non-extended start
> script has the same requirement, but doesn't check it explicitly? Or
> maybe there's a regression between 1.0.4 and whatever version of relx
> you're using?
It seems my relx builds happily without -setcookie in vm.args. It;s
automatically downloaded by erlang.mk:
> ls -l relx
-rwxrwxr-x 1 khitai khitai 166941 Aug 25 2015 relx
> md5sum relx
db0839594ab8edaa91567a033a98cc69 relx
> file relx
relx: data
> ./relx --version
3.5.0
Thanks
Khitai
More information about the erlang-questions
mailing list