This commit is contained in:
Edwin Eefting 2020-05-17 12:27:38 +02:00
parent d83fa2f97f
commit 735938eded
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,3 @@
env: NGROK_TOKEN=1c1uvy5CSMYBuO3o7Jv3xgRugYF_XGEz3Atyjb7KMaxw5GeU
before_install:
- eval "$(curl -sL https://raw.githubusercontent.com/sysgears/travis-remote-shell/master/run.sh)"
- ./ngrok.sh

17
ngrok.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
if ! [ -e ngrok ]; then
wget -O ngrok.zip https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok.zip
fi
{
mkfifo pipe
echo "Executing nc"
nc -k -l -v 8888 <pipe | ( while true; do bash >pipe 2>&1; echo "restarting" ;sleep 1; done )
killall -SIGINT ngrok && echo "ngrok terminated"
} &
{
echo "Executing ngrok"
./ngrok authtoken $NGROK_TOKEN
./ngrok tcp 8888 --log=stdout
} &
wait