Work script
This commit is contained in:
21
scripts/scripts/work
Normal file
21
scripts/scripts/work
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Configure these parameters
|
||||||
|
sleep=5
|
||||||
|
alive_interval=10
|
||||||
|
host=baggins.c.googlers.com
|
||||||
|
|
||||||
|
SSH_OPTS="-YXC -R 5037:localhost:5037 -oServerAliveInterval=$alive_interval"
|
||||||
|
|
||||||
|
tmux_cmd="gcertstatus || gcert; mux dev"
|
||||||
|
|
||||||
|
# Just keep reconnecting upon failure
|
||||||
|
while [ 1 ]; do
|
||||||
|
ssh -t $host $SSH_OPTS "$tmux_cmd"
|
||||||
|
|
||||||
|
# Don't reconnect if disconnection not due to error (i.e., user detached)
|
||||||
|
if [ $? -eq 0 ]; then break; fi
|
||||||
|
|
||||||
|
echo "SSH connection lost, reconnecting in $sleep seconds..."
|
||||||
|
sleep $sleep
|
||||||
|
done
|
@ -1,4 +1,5 @@
|
|||||||
export PATH=$PATH:$HOME/bin
|
export PATH=$PATH:$HOME/bin
|
||||||
|
export PATH=$PATH:$HOME/scripts
|
||||||
export MOCWORD_DATA=$HOME/mocword/mocword.sqlite
|
export MOCWORD_DATA=$HOME/mocword/mocword.sqlite
|
||||||
|
|
||||||
export PATH=$PATH:.
|
export PATH=$PATH:.
|
||||||
|
@ -1 +0,0 @@
|
|||||||
dotfiles/fzf/fzf-at-google.zsh
|
|
@ -1 +0,0 @@
|
|||||||
dotfiles/fzf/fzf-relevant-files.zsh
|
|
Reference in New Issue
Block a user