X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=prof-remote;h=9117f4630ae7881651cd47990b802f00811dfe95;hb=e72acaee4cf7c394ca0e35b84d3afbd8ef5a4b32;hp=d84889448e840fed321355154e4c5c44cdbd36ab;hpb=768363d8771edb9d9ed82425fa772d77b90139c0;p=distro-setup diff --git a/prof-remote b/prof-remote old mode 100755 new mode 100644 index d848894..9117f46 --- a/prof-remote +++ b/prof-remote @@ -1,13 +1,19 @@ #!/bin/bash -set -e; . /usr/local/lib/err; set +e +set -e; . /usr/local/lib/bash-bear; set +e remote=$1 fastcon=0 while true; do start=$EPOCHSECONDS - ssh -t $remote screen -Dr -S profanity + if ! ssh-add -l | grep SHA256:YEhwH5u+wkqkSl/dCq8rFebi2qz7Os3RmIWPxMg13eA &>/dev/null; then + ssh -n $remote + fi + # -n or else it competes with the other ssh for reading stdin. + ssh -n $remote prof-tail | prof-notify & + ssh -t $remote screen -Dr -S profanity ||: + builtin kill %% &> /dev/null ||: if (( EPOCHSECONDS > start + 600 )); then fastcon=0 fi