mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-03 12:46:49 +02:00
The daemon's self-update mechanism (git fetch/reset on its own code) was fragile: .git permission errors, self-modifying code mid-run, hardcoded main branch. Bambuddy now SSHes into the SpoolBuddy Pi and drives the update remotely — matching its own branch, with step-by-step progress via WebSocket. SSH key pairing is automatic: Bambuddy generates an ED25519 keypair and returns the public key in the registration response. The daemon deploys it to authorized_keys on first connect — no manual setup needed. - New: backend/app/services/spoolbuddy_ssh.py (keypair, SSH commands, update orchestration) - Rewritten: trigger_daemon_update endpoint uses SSH instead of pending_command - New: GET /spoolbuddy/ssh/public-key endpoint for manual pairing - Removed: daemon _perform_update() and cmd=="update" heartbeat handler - Updated: install.sh — bash shell, sudoers for systemctl restart, .ssh/ setup - Updated: Dockerfile — added openssh-client - Updated: frontend — SSH key display, force update button - Fixed: update check now compares against APP_VERSION, not GitHub releases