gnupg2/gpg-agent-shutdown.sh
Rex Dieter dfe3a6a6a3 - include gpg-agent-(startup|shutdown) scripts (#136533)
- BR: libksba-devel >= 1.9.12
2005-12-01 19:53:39 +00:00

16 lines
405 B
Bash
Executable File

#!/bin/sh
# $Id: gpg-agent-shutdown.sh,v 1.3 2004/12/09 14:27:31 rexdieter Exp $
## The nice way
if test -n "${GPG_AGENT_INFO}"; then
GPG_AGENT_PID=`echo ${GPG_AGENT_INFO} | cut -d: -f2` && kill ${GPG_AGENT_PID} ||:
unset GPG_AGENT_INFO
fi
## The not so nice way
## NOTE: a root login will kill *all* users' gpg-agents
#killall gpg-agent
## clean/remove .gpg-agent-info
rm -f $HOME/.gpg-agent-info