Fix more Tmux issues disovered when testing on a fresh machine [skip ci]

This commit is contained in:
Zahary Karadjov 2020-06-25 15:58:00 +03:00
parent fe15d473c9
commit 8288b568d2
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
2 changed files with 4 additions and 7 deletions

View File

@ -18,11 +18,8 @@ fi
if [[ "$USE_TMUX" != "no" ]]; then
TMUX_SESSION_NAME="${TMUX_SESSION_NAME:-nbc-sim}"
export USE_TMUX=yes
export TMUX_CMD
export TMUX_SESSION_NAME
$TMUX_CMD new-session -s "${TMUX_SESSION_NAME}" -d
$TMUX_CMD setenv -t "${TMUX_SESSION_NAME}" USE_TMUX yes
$TMUX_CMD bind-key -n q kill-session

View File

@ -19,7 +19,7 @@ if [[ "$USE_MULTITAIL" != "no" ]]; then
fi
USE_TMUX="${USE_TMUX:-no}"
if [[ "$USE_TMUX" != "no" ]]; then
if [[ "$USE_TMUX" == "yes" ]]; then
type "$TMUX_CMD" &>/dev/null || { echo "${TMUX_CMD}" is missing; USE_TMUX="no"; }
fi
@ -78,7 +78,7 @@ if [[ "$USE_GANACHE" == "yes" ]]; then
if [[ "$USE_TMUX" == "yes" ]]; then
$TMUX_CMD new-window -d -t $TMUX_SESSION_NAME -n "$GANACHE_CMD" "$GANACHE_CMD --blockTime 5 --gasLimit 100000000 -e 100000 --verbose"
else
echo NOTICE: $GANACHE_CMD will be started automatically only with USE_TMUX=1
echo NOTICE: $GANACHE_CMD will be started automatically only with USE_TMUX=yes
USE_GANACHE="no"
fi
fi
@ -92,7 +92,7 @@ if [[ "$USE_PROMETHEUS" == "yes" ]]; then
PROMETHEUS_FLAGS="--config.file=./prometheus.yml --storage.tsdb.path=./data"
$TMUX_CMD new-window -d -t $TMUX_SESSION_NAME -n "$PROMETHEUS_CMD" "cd '$METRICS_DIR' && $PROMETHEUS_CMD $PROMETHEUS_FLAGS"
else
echo NOTICE: $PROMETHEUS_CMD will be started automatically only with USE_TMUX=1
echo NOTICE: $PROMETHEUS_CMD will be started automatically only with USE_TMUX=yes
USE_PROMETHEUS="no"
fi
fi