27 lines
545 B
Bash
Executable File
27 lines
545 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
EDGE_DIR="$ROOT_DIR/dashboard-edge"
|
|
|
|
if [ ! -d "$EDGE_DIR" ]; then
|
|
echo "dashboard-edge directory not found: $EDGE_DIR" >&2
|
|
exit 1
|
|
fi
|
|
|
|
cd "$EDGE_DIR"
|
|
|
|
export EDGE_RELOAD="${EDGE_RELOAD:-true}"
|
|
export EDGE_LOG_LEVEL="${EDGE_LOG_LEVEL:-warning}"
|
|
export EDGE_ACCESS_LOG="${EDGE_ACCESS_LOG:-false}"
|
|
|
|
if [ -x "venv/bin/python" ]; then
|
|
exec venv/bin/python main.py
|
|
fi
|
|
|
|
if [ -x ".venv/bin/python" ]; then
|
|
exec .venv/bin/python main.py
|
|
fi
|
|
|
|
exec python3 main.py
|