aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates/extended_bin
diff options
context:
space:
mode:
authorBen Murphy <[email protected]>2016-08-09 15:46:07 +0100
committerLuis Rascao <[email protected]>2016-10-27 19:22:35 +0100
commit74b74a46de19f7630694646307cfd4dbd5552ea3 (patch)
tree4d8a8e3c6d41fcf39eb38ab8e672cb54f07d4177 /priv/templates/extended_bin
parent7231ee8eb29da0946792aef6ac155f9e31fb37ed (diff)
downloadrelx-74b74a46de19f7630694646307cfd4dbd5552ea3.tar.gz
relx-74b74a46de19f7630694646307cfd4dbd5552ea3.tar.bz2
relx-74b74a46de19f7630694646307cfd4dbd5552ea3.zip
ensure an appropriate TERM var is set
useful if deploying erlang nodes via capistrano when TERM is not set correctly attaching to the node will result in weirdness
Diffstat (limited to 'priv/templates/extended_bin')
-rwxr-xr-xpriv/templates/extended_bin4
1 files changed, 4 insertions, 0 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin
index 2630bbf..06c7242 100755
--- a/priv/templates/extended_bin
+++ b/priv/templates/extended_bin
@@ -13,6 +13,10 @@ set -e
RUN_ERL_DISABLE_FLOWCNTRL=${RUN_ERL_DISABLE_FLOWCNTRL:-true}
export $RUN_ERL_DISABLE_FLOWCNTRL
+if [ "$TERM" = "dumb" -o -z "$TERM" ]; then
+ export TERM=screen
+fi
+
SCRIPT=$(readlink $0 || true)
if [ -z $SCRIPT ]; then
SCRIPT=$0