There are currently extended hooks for start / stop and status. I use these to set VMARGS_PATH to start my node with specific config for this server using a release based on multiple profiles (especially the cookie).
Trouble is that ping, remote_console, attach and other nodetool based extended start script commands don't have hooks and there appears to be no way to hook into their environment. They just look in the default place for vm.args and hence in my case pick up different config to that used during startup.
One trivial workaround is just to call
relx_run_hooks "$PRE_START_HOOKS"
at a suitable place in the main script so all the sub commands can benefit from the updated environment provided by the hook.
I put it just here:
# Extract the name type and name from the NAME_ARG for REMSH
NAME_TYPE="$(echo "$NAME_ARG" | awk '{print $1}')"
NAME="$(echo "$NAME_ARG" | awk '{print $2}')"
relx_run_hooks "$PRE_START_HOOKS" # <<<<<<<<<<<<<<
# Extract dist arguments
MAYBE_DIST_ARGS=""
PROTO_DIST="$(grep '^-proto_dist' "$VMARGS_PATH" || true)"
if [ "$PROTO_DIST" ]; then
MAYBE_DIST_ARGS="${PROTO_DIST}"
fi
There are currently extended hooks for start / stop and status. I use these to set VMARGS_PATH to start my node with specific config for this server using a release based on multiple profiles (especially the cookie).
Trouble is that ping, remote_console, attach and other nodetool based extended start script commands don't have hooks and there appears to be no way to hook into their environment. They just look in the default place for vm.args and hence in my case pick up different config to that used during startup.
One trivial workaround is just to call
at a suitable place in the main script so all the sub commands can benefit from the updated environment provided by the hook.
I put it just here:
Any idea of a standard way to achieve this?