[mutt/gpg] mutt script check if gpg agent is launched before getting launch
This commit is contained in:
parent
cd34f6b458
commit
939cf96569
@ -1,3 +1,11 @@
|
|||||||
#could be placed in .profile c.f man page
|
#could be placed in .profile c.f man page
|
||||||
gpg-agent --daemon --enable-ssh-support \
|
gpg-agent --daemon --enable-ssh-support \
|
||||||
--write-env-file "${HOME}/.gpg-agent-info"
|
--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
11
scripts/run_mutt.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user