Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exodist@cgr-gentoo $ cat bin/remagent [~]
- #!/bin/bash
- FILE="/tmp/.pid.$@"
- if [ -e $FILE ]; then
- pid=`cat $FILE`
- kill -0 $pid &> /dev/null
- if [ $? -eq 0 ]; then
- echo "$0 already running on $@"
- exit 0;
- else
- rm -r "$FILE"
- fi
- fi
- echo "Starting $0"
- /usr/bin/ssh -tt "$@" 'if [ -e $SSH_AUTH_SOCK ]; then ln -sf $SSH_AUTH_SOCK /tmp/ssh-agent-$USER-screen; fi; while [ 0 -eq 0 ]; do sleep 1d; done' &>/dev/null &
- pid=$!
- echo -n $pid > "/tmp/.pid.$@"
- exodist@cgr-gentoo $ cat bin/s
- #!/bin/bash
- keychain /home/exodist/.ssh/id_rsa_chad /home/exodist/.ssh/id_rsa
- source /home/exodist/.keychain/$HOSTNAME-sh
- source /home/exodist/.keychain/$HOSTNAME-sh-gpg
- urxvt -e /usr/bin/ssh -Y -t $@ screen -RR
- cgr@edev2 $ cat .bashrc [~]
- test $SSH_AUTH_SOCK && ln -sf "$SSH_AUTH_SOCK" "/tmp/ssh-agent-$USER-screen"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement