fix(tmux): check is server running before connecting

This commit is contained in:
thek4n 2024-04-16 13:31:32 +03:00
parent 5d58745a09
commit 83d1ec948a
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ if \
[[ ! "$TERM" =~ tmux ]] && \
command -v tmux &>/dev/null
then
if tmux -N -L "$USER" server-info &>/dev/null; then
if tmux -N -L "$USER" list-sessions &>/dev/null; then
if [ -n "$SSH_CLIENT" ]; then
exec tmux -N -L "$USER" new-session
else

View File

@ -7,7 +7,7 @@ if \
[[ ! "$TERM" =~ tmux ]] && \
command -v tmux &>/dev/null
then
if tmux -N -L "$USER" server-info &>/dev/null; then
if tmux -N -L "$USER" list-sessions &>/dev/null; then
if [ -n "$SSH_CLIENT" ]; then
exec tmux -N -L "$USER" new-session
else