2020-07-06 09:05:56 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
# Change to the parent directory of the directory containing this script.
|
|
|
|
|
cd "$(cd "$(dirname "$0")" && pwd)/.."
|
|
|
|
|
|
|
|
|
|
# Ref: <https://stackoverflow.com/a/30969768/151048>.
|
|
|
|
|
if [[ -f .env ]]; then
|
|
|
|
|
echo "Found a .env file, loading environment variables from that file."
|
|
|
|
|
set -o allexport
|
|
|
|
|
source .env
|
|
|
|
|
fi
|
|
|
|
|
|
2021-01-28 06:38:44 +00:00
|
|
|
source ../util/is_wsl.sh
|
|
|
|
|
if [ $IS_WSL ]; then
|
|
|
|
|
_JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true $_JAVA_OPTIONS"
|
|
|
|
|
fi
|
|
|
|
|
|
2020-07-21 10:31:42 +00:00
|
|
|
(cd dist && exec java -jar server-*.jar)
|