Update work script

This commit is contained in:
Christian Nieves
2022-10-07 10:56:30 -05:00
parent 2b22e34af1
commit 27ea228fe1

View File

@ -5,15 +5,17 @@ sleep=5
alive_interval=10
host=baggins.c.googlers.com
# Tunnel ADB so locally connected devices work on cloudtop.
SSH_OPTS="-YXC -R 5037:localhost:5037 -oServerAliveInterval=$alive_interval"
tmux_cmd="gcertstatus || gcert; tmuxinator dev"
initial_cloudtop_command="gcertstatus || gcert; tmuxinator dev"
initial_client_command="gcertstatus || gcert"
gcertstatus || gcert
eval $inital_client_command
# Just keep reconnecting upon failure
while [ 1 ]; do
ssh $host -t $SSH_OPTS "$tmux_cmd"
ssh $host -t $SSH_OPTS "$initial_cloudtop_command"
# Don't reconnect if disconnection not due to error (i.e., user detached)
if [ $? -eq 0 ]; then break; fi