adacam-api/install.sh
Kayos 174de0637e fix: pre-liberation review — frames dir, wigle config GET, debug redis-keys endpoint
CRITICAL:
- frames.py: FRAMES_DIR corrected to /tmp/adacam/pics
- frames.py: graceful handling when capture not started

IMPORTANT:
- wigle.py: added GET /api/1/wigle/config endpoint for Varroa
- app.py: added GET /api/1/debug/redis-keys endpoint for GPS troubleshooting
- install.sh: removed python validation that runs from wrong directory
2026-03-14 17:59:08 -07:00

34 lines
924 B
Bash
Executable file

#!/bin/bash
# adacam-api installer for Hivemapper Bee device
set -e
INSTALL_DIR="/opt/adacam"
DATA_DIR="/data/adacam"
echo "[*] Installing adacam-api..."
# Create directories
mkdir -p "$INSTALL_DIR" "$DATA_DIR"
# Copy files
cp -r adacam_api main.py requirements.txt "$INSTALL_DIR/"
# Install Python dependencies
pip3 install --no-cache-dir -r "$INSTALL_DIR/requirements.txt"
# Install systemd service
cp systemd/adacam-api.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable adacam-api
# Note: Config is generated by liberate.sh or on first API start
# We don't validate Python imports here as the working directory matters
if [ ! -f "$DATA_DIR/config.json" ]; then
echo "[*] Config will be generated on first API start"
fi
echo "[*] Starting adacam-api..."
systemctl restart adacam-api
systemctl status adacam-api --no-pager || true
echo "[+] Installation complete. API running on port 5000"