diff --git a/scripts/run_gpg.sh b/scripts/run_gpg.sh index 05043a4..1671e29 100755 --- a/scripts/run_gpg.sh +++ b/scripts/run_gpg.sh @@ -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" + --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 + diff --git a/scripts/run_mutt.sh b/scripts/run_mutt.sh new file mode 100755 index 0000000..e29cf3d --- /dev/null +++ b/scripts/run_mutt.sh @@ -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