Only look for our ssh-agent processes

This commit is contained in:
Paul Walker
2019-10-17 14:00:37 +01:00
parent feda3502c3
commit 545aa3b640

6
bashrc
View File

@@ -87,7 +87,7 @@ fi
SSH_AGENT_FILE=$HOME/ssh.sh
if [ -f $SSH_AGENT_FILE ] ; then
FILE_PID=$(grep SSH_AGENT_PID $SSH_AGENT_FILE | sed -e 's/^.*=//' | sed -e 's/;.*$//')
RUNNING_PID=$(pgrep ssh-agent)
RUNNING_PID=$(pgrep -U $USER ssh-agent)
if [ "$RUNNING_PID" == "" ] ; then
# No agent running
echo Starting ssh-agent, you need to load keys though.
@@ -116,6 +116,8 @@ fi
# echo "Note - Dropbox isn't running!"
# fi
export PATH=$HOME/bin:$PATH
# Load any supplementary scripts
if [ -d "$HOME"/.bashrc.d ] ; then
for config in "$HOME"/.bashrc.d/*.bash ; do
@@ -124,4 +126,4 @@ if [ -d "$HOME"/.bashrc.d ] ; then
unset -v config
fi
export PATH=$HOME/bin:$PATH
[ -f ~/.fzf.bash ] && source ~/.fzf.bash