Skip to content

Commit c7e838b

Browse files
committed
Start client after push
1 parent 5a5b6f3 commit c7e838b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

push.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ fi
4949

5050
url=`cf app $appname | grep urls: | cut -d ' ' -f2`
5151

52-
./chisel client --keepalive 10s https://$url 5022:2022 &
52+
# If there's an existing client running, kill it
53+
client_pids=`ps auxww | grep ./chisel | grep 5022:2022 | grep -v grep | awk '{print $2}'`
54+
if [ -n "$client_pids" ]; then
55+
kill $client_pids
56+
fi
57+
58+
./chisel client --keepalive 10s https://$url 5022:2022 > /dev/null &
5359

5460
cat <<_EOF_
5561
You can now connect via

0 commit comments

Comments
 (0)