diff options
author | Alex Auvolat <alex@adnab.me> | 2022-04-20 15:29:24 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-04-20 15:29:24 +0200 |
commit | 226fbabf655656f16ca883c8489a2360abdb8367 (patch) | |
tree | 2983e42a4cdccc408f2added26d9df21342fdd7a /tlsproxy.sh | |
parent | 7c1444b7143710066f5173119a529c3b5e101300 (diff) | |
download | nixcfg-226fbabf655656f16ca883c8489a2360abdb8367.tar.gz nixcfg-226fbabf655656f16ca883c8489a2360abdb8367.zip |
tlsproxy from pass; fix tls stuff
Diffstat (limited to 'tlsproxy.sh')
-rwxr-xr-x | tlsproxy.sh | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tlsproxy.sh b/tlsproxy.sh deleted file mode 100755 index a893872..0000000 --- a/tlsproxy.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -set -xe - -# Enter proper cluster subdirectory - -cd $(dirname $0) - -CLUSTER="$1" -if [ ! -d "cluster/$CLUSTER" ]; then - echo "Usage: $0 <cluster name>" - echo "The cluster name must be the name of a subdirectory of cluster/" - exit 1 -fi - -cd cluster/$CLUSTER - -# Do actual stuff - -YEAR=$(date +%Y) - -_int() { - echo "Caught SIGINT signal!" - kill -INT "$child1" 2>/dev/null - kill -INT "$child2" 2>/dev/null -} - -trap _int SIGINT - -socat -dd tcp4-listen:4646,reuseaddr,fork openssl:localhost:14646,cert=secrets/pki/nomad$YEAR-client.crt,key=secrets/pki/nomad$YEAR-client.key,cafile=secrets/pki/nomad$YEAR.crt & -child1=$! - -socat -dd tcp4-listen:8500,reuseaddr,fork openssl:localhost:8501,cert=secrets/pki/consul$YEAR-client.crt,key=secrets/pki/consul$YEAR-client.key,cafile=secrets/pki/consul$YEAR.crt & -child2=$! - -wait "$child1" -wait "$child2" |