git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Pfeiffer <coding _ lirion.de> 2022-07-06 09:31:41 +0200
committerHarald Pfeiffer <coding _ lirion.de> 2022-07-06 09:31:41 +0200
commite35bf84abb7f864c7d512d2b2f84c6e204859810 (patch)
treecedddf5e4f0c289a846ae5ab7a9785b13010b7f9
parent8bf3be857b622fcbe6c49933a3ee7379b514aef1 (diff)
downloaddotfiles-e35bf84abb7f864c7d512d2b2f84c6e204859810.tar.bz2
Execute key addition on any login on the hosts which serve as "admin stations"
-rw-r--r--.bash/postexec.bash6
1 files changed, 5 insertions, 1 deletions
diff --git a/.bash/postexec.bash b/.bash/postexec.bash
index b2f257e..564356a 100644
--- a/.bash/postexec.bash
+++ b/.bash/postexec.bash
@@ -1,4 +1,8 @@
declare -x SSH_AUTH_SOCK SSH_AGENT_PID
if [ -n "$SSHENVFILE" ] && [ -r "$SSHENVFILE" ];then
- source "$SSHENVFILE"
+ if source "$SSHENVFILE"; then
+ if echo "${SSHAGH[@]}"|tr ' ' '\n'|grep -P "^$(hostname -f)$" > /dev/null;then
+ add-sshagent-init
+ fi
+ fi
fi