mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-09 07:25:44 +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. After updating the daemon, the kiosk browser is also restarted so it loads the updated frontend. 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. Changes: - New: backend/app/services/spoolbuddy_ssh.py - Rewritten: trigger_daemon_update endpoint (SSH instead of pending_command) - New: GET /spoolbuddy/ssh/public-key endpoint - Auto SSH key deployment via registration response + daemon - Removed: daemon _perform_update() and cmd=="update" handler - Install script: bash shell, sudoers for daemon + kiosk restart, .ssh/ setup - Dockerfile: added openssh-client - Frontend: SSH key display, force update button - Fixed: update check compares APP_VERSION, not GitHub releases - Fixed: kiosk browser restart after update