#!/usr/bin/env bash # Local dev only: (re)start the PoC here, camera credentials read from the park-lab DB copy. set -euo pipefail cd "$(dirname "$0")" [ -f pid ] && kill "$(cat pid)" 2>/dev/null && sleep 2 || true eval "$(python3 -c " import sqlite3,json db=sqlite3.connect('file:../../.local-parklab/parking.sqlite?mode=ro',uri=True) c=json.loads(db.execute(\"select config from devices where config like '%10.0.10.6%'\").fetchone()[0]) print(f\"export CAM_USER='{c['username']}' CAM_PASS='{c['password']}'\")")" nohup ../../apps/vision/.venv/bin/python -u zone_anpr.py config.json >> out.log 2>&1 & echo $! > pid