18 lines
338 B
Bash
18 lines
338 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
SKILL_DIR="$(dirname "$(dirname "$0")")"
|
|
source "$SKILL_DIR/lib/http.sh"
|
|
source "$SKILL_DIR/lib/machines.sh"
|
|
|
|
PORT="${FLEET_API_PORT:-3001}"
|
|
DATA_DIR="${FLEET_DATA_DIR:-/data/fleet}"
|
|
|
|
export DATA_DIR
|
|
|
|
echo "Starting Fleet API on port $PORT..."
|
|
echo "Data directory: $DATA_DIR"
|
|
|
|
# Start HTTP server
|
|
http_server "$PORT"
|