diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2022-12-26 13:06:48 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2022-12-26 13:06:48 -0500 |
| commit | 639e50050702d094a9464cf263995f7f19079eaf (patch) | |
| tree | cd6502f6d5af67e5a887474ed3225af37a20cd02 /genclient.sh | |
| parent | 9bd432b5de3592f89d885deaff953418822acaa9 (diff) | |
| download | rshsh-639e50050702d094a9464cf263995f7f19079eaf.tar.gz rshsh-639e50050702d094a9464cf263995f7f19079eaf.tar.xz | |
Diffstat (limited to 'genclient.sh')
| -rwxr-xr-x | genclient.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/genclient.sh b/genclient.sh index 9984a8b..6e2cda2 100755 --- a/genclient.sh +++ b/genclient.sh @@ -23,10 +23,13 @@ cat <<EOF _shell="\$(which zsh mksh bash ksh zsh ash sh 2>/dev/null | sed 1q)" certificate='$(cat ${basename}.crt)' crt_tmp="\$(mktemp)" +trap 'rm -f \$crt_tmp; exit 0' EXIT INT echo "\$certificate" > "\$crt_tmp" while [ $loop -ne 0 ] ; do -socat exec:"\$_shell",pty,stderr,setsid,sigint,sane OPENSSL:$hostname:$port,verify=$verify,cafile=\$crt_tmp +socat exec:"\$_shell",pty,stderr,setsid,sigint,sane \\ + "OPENSSL:$hostname:$port,verify=$verify,cafile=\$crt_tmp" sleep $timeout done -rm "\$crt_tmp" + +exit 0 EOF |
