2020-03-13 12:48:38 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-01-20 11:01:00 -06:00
|
|
|
. scripts/grafana-server/variables
|
2020-03-13 12:48:38 -05:00
|
|
|
|
2023-01-26 15:04:13 -06:00
|
|
|
LICENSE_PATH=""
|
|
|
|
|
|
|
|
if [ "$1" = "enterprise" ]; then
|
|
|
|
if [ "$2" != "dev" ] && [ "$2" != "debug" ]; then
|
|
|
|
LICENSE_PATH=$2/license.jwt
|
|
|
|
else
|
|
|
|
LICENSE_PATH=$3/license.jwt
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2020-05-03 06:51:30 -05:00
|
|
|
if [ "$BASE_URL" != "" ]; then
|
|
|
|
echo -e "BASE_URL set, skipping starting server"
|
|
|
|
else
|
|
|
|
# Start it in the background
|
2023-01-26 15:04:13 -06:00
|
|
|
./scripts/grafana-server/start-server $LICENSE_PATH 2>&1 > scripts/grafana-server/server.log &
|
2022-01-20 11:01:00 -06:00
|
|
|
./scripts/grafana-server/wait-for-grafana
|
2020-05-03 06:51:30 -05:00
|
|
|
fi
|
2020-03-13 12:48:38 -05:00
|
|
|
|
|
|
|
./e2e/run-suite "$@"
|