add SSH timeout
This commit is contained in:
parent
85b1debb27
commit
b4110a09bc
1 changed files with 3 additions and 3 deletions
6
strm
6
strm
|
|
@ -126,10 +126,10 @@ if [ "$remote" != "" ]; then
|
|||
fi
|
||||
|
||||
# Check if strm tmux session is already running
|
||||
if ssh "$remote" "tmux has-session -t strm &>/dev/null"; then
|
||||
if ssh -o ConnectTimeout=10 "$remote" "tmux has-session -t strm &>/dev/null"; then
|
||||
|
||||
# Attach to tmux session
|
||||
ssh -t "$remote" "tmux attach-session -t strm &>/dev/null"
|
||||
ssh -o ConnectTimeout=10 -t "$remote" "tmux attach-session -t strm &>/dev/null"
|
||||
|
||||
else
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ if [ "$remote" != "" ]; then
|
|||
remote_arguments+=("--is-remote-call")
|
||||
|
||||
# Execute strm on remote machine
|
||||
ssh -t "$remote" "DISPLAY=:0 tmux new-session -s strm 'tmux set-option status off; strm ${remote_arguments[@]}' &>/dev/null"
|
||||
ssh -o ConnectTimeout=10 -t "$remote" "DISPLAY=:0 tmux new-session -s strm 'tmux set-option status off; strm ${remote_arguments[@]}' &>/dev/null"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue