Advertisement
dyeske

stuff

Jun 20th, 2024
688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.52 KB | None | 0 0
  1. stuff() {
  2.     # if [ -n "$SSH_AUTH_SOCK" ]; then
  3.     #    echo "already have sock $SSH_AUTH_SOCK"
  4.     # else
  5.     #     eval `ssh-agent`; ssh-add ~/.ssh/id_openwrt; ssh-add -l
  6.     # fi
  7.     screen -list | grep "Dead ???" > /dev/null && screen -wipe
  8.     if [ -n "$STY" ]; then
  9.         echo "already on screen on $STY DISPLAY $DISPLAY"
  10.         # xauth extract - $DISPLAY | ssh -i ~/.ssh/id_openwrt localhost xauth merge -
  11.     else
  12.         echo "starting screen on $STY DISPLAY $DISPLAY"
  13.         screen -d -RR
  14.     fi
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement