2024-06-14 19:41:17 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2025-09-03 22:45:54 +08:00
|
|
|
# Ensure we're in the Grafana root directory
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1
|
|
|
|
|
2024-06-14 19:41:17 +08:00
|
|
|
. scripts/grafana-server/variables
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
if [ "$BASE_URL" != "" ]; then
|
|
|
|
echo -e "BASE_URL set, skipping starting server"
|
|
|
|
else
|
2025-07-19 00:08:47 +08:00
|
|
|
./scripts/grafana-server/start-server $LICENSE_PATH > scripts/grafana-server/server.log
|
2024-06-14 19:41:17 +08:00
|
|
|
fi
|
|
|
|
|