pomerium/examples/tcp/pomerium-tunnel.sh
Alex Fornuto b2b8c481d5
Refresh and Update TCP documentation (#2627)
* init client app doc

* init TCP section

* add redirect for TCP client doc

* Redis and Mysql

* finish TCP exampels

* init Draft template

* cleanup whitespace

* escape markdown image in template

* add redirect and update links

* copy edit

* Update readme.md

* fmt

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>

* optimize png

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>

* header cleanup and child listing

* Update docs/docs/tcp/ssh.md

Co-authored-by: bobby <1544881+desimone@users.noreply.github.com>

Co-authored-by: cmo-pomerium <91488121+cmo-pomerium@users.noreply.github.com>
Co-authored-by: Bobby DeSimone <bobbydesimone@gmail.com>
Co-authored-by: bobby <1544881+desimone@users.noreply.github.com>
2021-10-14 09:35:31 -05:00

24 lines
430 B
Bash

#!/bin/bash
scriptname="$(basename $0)"
if [ $# -lt 3 ]
then
echo "Usage: $scriptname start | stop POMERIUM_ROUTE LOCAL_PORT"
exit
fi
case "$1" in
start)
echo "Starting Pomerium Tunnel to $2"
pomerium-cli tcp $2 --listen $3 &
;;
stop)
echo "Stopping Pomerium tunnel to $3"
kill $(pgrep -f "pomerium-cli tcp $2 --listen $3")
;;
*)
echo "Did not understand your argument, please use start|stop"
;;
esac