summaryrefslogtreecommitdiff
path: root/src/samizdat-gpg-agent
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-05-01 05:25:14 -0400
committerAndrew Cady <d@jerkface.net>2016-05-01 05:28:22 -0400
commita8e19d5d8057e82cbda2705d755f3d4e1d3da20a (patch)
tree84449f8ac6e45a5727b0abbb64eeb578c20628fd /src/samizdat-gpg-agent
parent4854ffec94f70705dc95c5657e43c5f69c270a1a (diff)
remove references to files outside of this repo
(commit the files into this repo)
Diffstat (limited to 'src/samizdat-gpg-agent')
-rwxr-xr-xsrc/samizdat-gpg-agent31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/samizdat-gpg-agent b/src/samizdat-gpg-agent
new file mode 100755
index 0000000..5b09b7b
--- /dev/null
+++ b/src/samizdat-gpg-agent
@@ -0,0 +1,31 @@
1#!/bin/sh
2export GNUPGHOME=/gpg/gnupghome
3do_ps()
4{
5 . "$GNUPGHOME"/gpg-agent-info
6 GPG_PID=${GPG_AGENT_INFO#*:}
7 GPG_PID=${GPG_PID%:*}
8 /bin/ps uwww $GPG_PID >&2
9}
10
11sh_exports()
12{
13 cat "$GNUPGHOME"/gpg-agent-info || exit
14 echo GNUPGHOME="'$GNUPGHOME'"
15 echo export GNUPGHOME GPG_AGENT_INFO SSH_AUTH_SOCK SSH_AGENT_PID
16}
17
18gpg-agent --daemon \
19 --enable-ssh-support \
20 --allow-preset-passphrase \
21 --use-standard-socket \
22 --homedir "$GNUPGHOME" \
23 --write-env-file "$GNUPGHOME"/gpg-agent-info
24
25case $? in
26 0) ;;
27 2) [ "$verbose" ] && do_ps ;;
28 *) exit $? ;;
29esac
30
31sh_exports