Remove ssh-agent handling stuff from .bash_logout.
This commit is contained in:
parent
2fb92a28a6
commit
813d82b1fe
1 changed files with 0 additions and 27 deletions
27
.bash_logout
27
.bash_logout
|
@ -12,30 +12,3 @@ if (( $SHLVL == 1 )); then
|
||||||
echo -ne "\E[2J"
|
echo -ne "\E[2J"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
hash ssh-add ssh-agent >/dev/null 2>&1 && {
|
|
||||||
# Determine the platform we're on.
|
|
||||||
_PLATFORM="$(uname -s)"
|
|
||||||
|
|
||||||
# Remove the $SSH_AUTH_SOCK from the agents file.
|
|
||||||
[[ ! -z "$SSH_AUTH_SOCK" ]] && (( ${_SSH_AGENT_REG_FAILED:-0} == 0 )) && {
|
|
||||||
_lock_agents_file && {
|
|
||||||
_pop_agent_sock || {
|
|
||||||
echo -e "$(tput setaf 1)Failed to clean up agents file!$(tput op)"
|
|
||||||
_SLEEP=3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_unlock_agents_file
|
|
||||||
}
|
|
||||||
|
|
||||||
# Kill the ssh-agent.
|
|
||||||
(( $SHLVL == 1 )) && {
|
|
||||||
[[ ! -z "$SSH_AGENT_PID" ]] && {
|
|
||||||
ssh-agent -k >/dev/null 2>&1 || {
|
|
||||||
echo -e "$(tput setaf 1)Failed to kill ssh-agent!$(tput op)"
|
|
||||||
_SLEEP=3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sleep ${_SLEEP:-0}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue