summaryrefslogtreecommitdiff
path: root/notmuch-tcp
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2019-11-24 20:06:28 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2019-11-24 20:06:28 +0100
commitf28f4fc1bef6ebabb9c340c3fdfb92eee1423c5c (patch)
tree866bf3a0b3f0d67d5b3867a75f479018b95e3d0d /notmuch-tcp
parenta7f511e7c9e8099db097d58c4fa6775766850c56 (diff)
downloadutils-f28f4fc1bef6ebabb9c340c3fdfb92eee1423c5c.tar
utils-f28f4fc1bef6ebabb9c340c3fdfb92eee1423c5c.tar.gz
utils-f28f4fc1bef6ebabb9c340c3fdfb92eee1423c5c.tar.bz2
utils-f28f4fc1bef6ebabb9c340c3fdfb92eee1423c5c.tar.xz
utils-f28f4fc1bef6ebabb9c340c3fdfb92eee1423c5c.zip
notmuch-tcp
Diffstat (limited to 'notmuch-tcp')
-rwxr-xr-xnotmuch-tcp9
1 files changed, 9 insertions, 0 deletions
diff --git a/notmuch-tcp b/notmuch-tcp
new file mode 100755
index 0000000..71680d0
--- /dev/null
+++ b/notmuch-tcp
@@ -0,0 +1,9 @@
1#!@zsh@/bin/zsh
2
3NOTMUCH_TCP=${NOTMUCH_TCP:-2010}
4HOST=${HOST:-$(@nettools/bin/hostname -s)}
5NOTMUCH_HOST=${NOTMUCH_HOST:-odin.asgard.yggdrasil}
6
7cd ~/.notmuch-tcp
8
9@socat@/bin/socat STDIO,ignoreeof openssl:${NOTMUCH_HOST}:${NOTMUCH_TCP},verify=1,cafile=ca.pem,certificate=${HOST}.pem,key=${HOST}.key <<(print "${(@q)@}"; inp=$(cat); printf "%d\n" $(wc -c <<<"${inp}"); cat <<<"${inp}")