From 5f1292d9588de10d04dd77509f72c8ecc30bc233 Mon Sep 17 00:00:00 2001 From: Kevin Cotugno Date: Tue, 17 Dec 2019 07:15:05 -0700 Subject: [PATCH] Remove ssh-sentinel --- .ssh-sentinel | 32 -------------------------------- .zshrc | 1 - 2 files changed, 33 deletions(-) delete mode 100644 .ssh-sentinel diff --git a/.ssh-sentinel b/.ssh-sentinel deleted file mode 100644 index 3c33ebe..0000000 --- a/.ssh-sentinel +++ /dev/null @@ -1,32 +0,0 @@ -file="$HOME/.ssh-agent" - -which ssh-agent &> /dev/null -if (( $? )); then - exit 1 -fi - -if [[ -n "$SSH_AUTH_SOCK" ]] && [[ -n "$SSH_AGENT_PID" ]]; then - return -fi - -if [[ -e $file ]]; then - sockenv=`cat $file | grep SSH_AUTH_SOCK` - pidenv=`cat $file | grep SSH_AGENT_PID` - pid=`printf "$pidenv" | grep -o "[0-9]*"` - - kill -0 "$pid" &> /dev/null - if (( ! $? )); then - export "$sockenv" - export "$pidenv" - return - fi -fi - -export $(ssh-agent -s | - awk '{ - if ($1 ~ ".*=.*;") { - print substr($1, 0, length($1) - 1) - } - }' | - tee "$file") -chmod 600 "$file" diff --git a/.zshrc b/.zshrc index 3eb1f78..5102662 100644 --- a/.zshrc +++ b/.zshrc @@ -1,5 +1,4 @@ local oh_my_zsh="$HOME/.oh-my-zsh" -source $HOME/.ssh-sentinel if [[ -f "$oh_my_zsh/oh-my-zsh.sh" ]]; then local theme="jispwoso"