Skip to content

Commit f3ae095

Browse files
committed
Merge pull request #184 from jwilberding/fix_foreground
Fix foreground
2 parents 6127841 + 2489cb0 commit f3ae095

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

priv/templates/extended_bin.dtl

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ relx_rem_sh() {
3030
# Generate a unique id used to allow multiple remsh to the same node
3131
# transparently
3232
id="remsh$(relx_gen_id)-${NAME}"
33-
33+
3434
# Setup remote shell command to control node
3535
exec "$BINDIR/erl" "$NAME_TYPE" "$id" -remsh "$NAME" -boot start_clean \
3636
-setcookie "$COOKIE"
@@ -60,8 +60,8 @@ if [ -z "$VMARGS_PATH" ]; then
6060
VMARGS_PATH="$RELEASE_ROOT_DIR/vm.args"
6161
USE_DIR="$RELEASE_ROOT_DIR"
6262
else
63-
USE_DIR="$REL_DIR"
64-
VMARGS_PATH="$REL_DIR/vm.args"
63+
USE_DIR="$REL_DIR"
64+
VMARGS_PATH="$REL_DIR/vm.args"
6565
fi
6666
fi
6767

@@ -156,7 +156,7 @@ case "$1" in
156156
# Set arguments for the heart command
157157
set -- "$SCRIPT_DIR/$REL_NAME" "$HEART_OPTION"
158158
[ "$RUN_PARAM" ] && set -- "$@" "$RUN_PARAM"
159-
159+
160160
# Export the HEART_COMMAND
161161
HEART_COMMAND="$@"
162162
export HEART_COMMAND
@@ -298,7 +298,7 @@ case "$1" in
298298
export PROGNAME
299299

300300
# Store passed arguments since they will be erased by `set`
301-
ARGS="$@"
301+
ARGS="$@"
302302

303303
# Build an array of arguments to pass to exec later on
304304
# Build it here because this command will be used for logging.
@@ -323,7 +323,7 @@ case "$1" in
323323
# or other supervision services
324324

325325
[ -f "$REL_DIR/$REL_NAME.boot" ] && BOOTFILE="$REL_NAME" || BOOTFILE=start
326-
FOREGROUNDOPTIONS="-noinput +Bd"
326+
FOREGROUNDOPTIONS="-noshell -noinput +Bd"
327327

328328
# Setup beam-required vars
329329
EMU=beam
@@ -333,11 +333,11 @@ case "$1" in
333333
export PROGNAME
334334

335335
# Store passed arguments since they will be erased by `set`
336-
ARGS="$@"
336+
ARGS="$@"
337337

338338
# Build an array of arguments to pass to exec later on
339339
# Build it here because this command will be used for logging.
340-
set -- "$BINDIR/erlexec" "$FOREGROUNDOPTIONS" \
340+
set -- "$BINDIR/erlexec" $FOREGROUNDOPTIONS \
341341
-boot "$REL_DIR/$BOOTFILE" -mode embedded -config "$CONFIG_PATH" \
342342
-args_file "$VMARGS_PATH"
343343

0 commit comments

Comments
 (0)