23 lines
487 B
Bash
23 lines
487 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
SKILL_DIR="$(dirname "$(dirname "$0")")"
|
|
|
|
echo "=== Fleet API Setup ==="
|
|
|
|
# Create data directory
|
|
DATA_DIR="${FLEET_DATA_DIR:-/data/fleet}"
|
|
mkdir -p "$DATA_DIR"
|
|
|
|
# Initialize empty machines file if not exists
|
|
if [ ! -f "$DATA_DIR/machines.json" ]; then
|
|
echo '{}' > "$DATA_DIR/machines.json"
|
|
echo "Initialized machines.json"
|
|
fi
|
|
|
|
# Ensure scripts are executable
|
|
chmod +x "$SKILL_DIR/scripts/"*.sh
|
|
chmod +x "$SKILL_DIR/lib/"*.sh
|
|
|
|
echo "Fleet API setup complete"
|