[mutt/gpg] mutt script check if gpg agent is launched before getting launch

This commit is contained in:
Mathieu Maret 2010-11-29 17:11:42 +01:00
parent cd34f6b458
commit 939cf96569
2 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,11 @@
#could be placed in .profile c.f man page
gpg-agent --daemon --enable-ssh-support \
--write-env-file "${HOME}/.gpg-agent-info"
if [ -f "${HOME}/.gpg-agent-info" ]; then
. "${HOME}/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID
fi

11
scripts/run_mutt.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/zsh
is_running=`ps aux| grep gpg-agent| grep -v grep`
if [ $is_running ] ; then
echo "gpg is running";
else
env=`./run_gpg.sh`
source $env
fi
mutt