git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Pfeiffer <coding _ lirion.de> 2022-03-24 10:44:05 +0100
committerHarald Pfeiffer <coding _ lirion.de> 2022-03-24 10:44:05 +0100
commit47b582f42b6731902a7a0f5b6389300d831bd269 (patch)
treec1de6209ffcf5264ada0bac6f50da78c21ce1afe
parented38fa7e33af9162974e940e797d4eb1f11e3d42 (diff)
downloaddotfiles-47b582f42b6731902a7a0f5b6389300d831bd269.tar.bz2
fix and improvement: dirmngr
- fix: missing then after if - improvement: using pgrep instead of ps+pgrep|grep
-rw-r--r--.bash/exec.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/.bash/exec.bash b/.bash/exec.bash
index a469ccf..a59df2a 100644
--- a/.bash/exec.bash
+++ b/.bash/exec.bash
@@ -11,7 +11,7 @@ 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
- if ! ps -fp "$(pgrep -d, -x dirmngr)" | grep "^$(whoami)" > /dev/null
+ if ! pgrep -au "$(id -u)" dirmngr >/dev/null;then
gpg-connect-agent --dirmngr /bye 2>/dev/null
gpg --list-secret-keys >/dev/null 2>&1
fi