[erlang-questions] Problems stop/attach a release

Roger Lipscombe <>
Mon Mar 21 20:21:09 CET 2016


On 21 March 2016 at 19:00, Khitai Pang <> 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?


More information about the erlang-questions mailing list