diff options
author | Andrew Cady <d@jerkface.net> | 2016-05-01 05:25:14 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2016-05-01 05:28:22 -0400 |
commit | a8e19d5d8057e82cbda2705d755f3d4e1d3da20a (patch) | |
tree | 84449f8ac6e45a5727b0abbb64eeb578c20628fd /src/samizdat-gpg-agent | |
parent | 4854ffec94f70705dc95c5657e43c5f69c270a1a (diff) |
remove references to files outside of this repo
(commit the files into this repo)
Diffstat (limited to 'src/samizdat-gpg-agent')
-rwxr-xr-x | src/samizdat-gpg-agent | 31 |
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 | ||
2 | export GNUPGHOME=/gpg/gnupghome | ||
3 | do_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 | |||
11 | sh_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 | |||
18 | gpg-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 | |||
25 | case $? in | ||
26 | 0) ;; | ||
27 | 2) [ "$verbose" ] && do_ps ;; | ||
28 | *) exit $? ;; | ||
29 | esac | ||
30 | |||
31 | sh_exports | ||