aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Overbruck <mail@duncano.de>2019-11-06 14:40:12 +0100
committerDuncan Overbruck <mail@duncano.de>2019-11-06 14:40:12 +0100
commit6c09069225aa00dae172529f226fbbf0b02b337b (patch)
tree0e0f2cb13f363b2985b22814cbb31b84facf4e2e
parente952fda21c936a774b074d78229cb20307b78bb7 (diff)
downloaddotfiles-6c09069225aa00dae172529f226fbbf0b02b337b.tar.gz
sv/gpg-agent: initial import
-rwxr-xr-xsv/gpg-agent/run16
l---------sv/gpg-agent/supervise1
2 files changed, 17 insertions, 0 deletions
diff --git a/sv/gpg-agent/run b/sv/gpg-agent/run
new file mode 100755
index 0000000..1e33301
--- /dev/null
+++ b/sv/gpg-agent/run
@@ -0,0 +1,16 @@
+#!/bin/execlineb
+
+backtick -n agent-socket { gpgconf --list-dirs agent-socket }
+backtick -n agent-ssh-socket { gpgconf --list-dirs agent-ssh-socket }
+multisubstitute {
+ importas agent-socket agent-socket
+ importas agent-ssh-socket agent-ssh-socket
+}
+getpid LISTEN_PID
+export LISTEN_FDS 2
+export LISTEN_FDNAMES std:ssh
+s6-ipcserver-socketbinder -a 0600 $agent-socket
+fdmove 3 0
+s6-ipcserver-socketbinder -a 0600 $agent-ssh-socket
+fdmove 4 0
+gpg-agent --supervised
diff --git a/sv/gpg-agent/supervise b/sv/gpg-agent/supervise
new file mode 120000
index 0000000..256cc9f
--- /dev/null
+++ b/sv/gpg-agent/supervise
@@ -0,0 +1 @@
+/run/runit.duncan/supervise.gpg-agent \ No newline at end of file