Skip to content

Instantly share code, notes, and snippets.

@max-verem
Created March 4, 2020 12:43
Show Gist options
  • Save max-verem/2a181f0760c5c6335612f73962dc8038 to your computer and use it in GitHub Desktop.
Save max-verem/2a181f0760c5c6335612f73962dc8038 to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir /var/run/pcscd
while :
do
/usr/bin/socat -d -d -d \
UNIX-LISTEN:/var/run/pcscd/pcscd.comm,reuseaddr,fork \
TCP:10.1.1.151:4001,nodelay,nonblock
sleep 2
done
#!/bin/bash
socat -d -d -d \
TCP-LISTEN:4001,nodelay,reuseaddr,fork,keepalive,keepidle=10,keepintvl=10,keepcnt=2,nonblock \
UNIX-CONNECT:/var/run/pcscd/pcscd.comm,ignoreeof,nonblock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment