Last active
December 19, 2019 23:17
-
-
Save nguyentruongtho/a6c17a65a9c84e5c48c12f492a42d800 to your computer and use it in GitHub Desktop.
msvn.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ "$MYSQL_CONNECTION_URL" == *":13306"* ]]; then | |
# if local db server is enabled (which should be tunneled in by chisel) | |
chmod +x ./chisel | |
./chisel server --reverse --uds --port $PORT --proxy "http://localhost:${FORWARD_PORT:-8081}/" & | |
while true; do | |
# wait for the db server to be ready | |
if (grep -v "rem_address" /proc/net/tcp|grep ':33FA' 1>/dev/null); then | |
echo "Local database started!" | |
break | |
fi | |
sleep 1 | |
done | |
fi | |
java -cp $(ls *.jar | paste -sd ':' -) server.Start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment