From ad993fafc2bd05b651b46edf9e12da8d5dec4a99 Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Wed, 23 Mar 2022 20:19:13 +0100 Subject: fixes --- .bash/exec.bash | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '.bash/exec.bash') diff --git a/.bash/exec.bash b/.bash/exec.bash index e8fdb9d..24b3ee9 100644 --- a/.bash/exec.bash +++ b/.bash/exec.bash @@ -7,9 +7,12 @@ set bell-style visible # start ssh agent. this script will not try to run a new instance # (unless we specified -f, which we don't). -if echo "${SSHAGH[@]}" | fgrep --word-regexp "$(hostname -f)" > /dev/null;then - "$HOME/bin/ssh-agent-launcher" -q - gpg-connect-agent --dirmngr /bye +if echo "${SSHAGH[@]}" | grep -F --word-regexp "$(hostname -f)" > /dev/null;then + # do not launch from SSH session, conflicts with user logging on locally afterwards + if [ -z "$SSH_TTY" ];then + "$HOME/bin/ssh-agent-launcher" -q + gpg-connect-agent --dirmngr /bye + fi fi # because on some hosts the login path is fucked, unset in .local -- cgit v1.2.3