|
|
@@ -214,7 +214,7 @@ async def perform_ssh_update(device_id: str, ip_address: str, install_path: str
|
|
|
if rc != 0:
|
|
|
logger.warning("SpoolBuddy %s: pip install returned non-zero (continuing): %s", device_id, stderr[:200])
|
|
|
|
|
|
- # Step 5: Restart service
|
|
|
+ # Step 5: Restart daemon
|
|
|
await _update_progress("updating", "Restarting daemon...")
|
|
|
rc, _, stderr = await _run_ssh_command(
|
|
|
ip_address,
|
|
|
@@ -225,6 +225,17 @@ async def perform_ssh_update(device_id: str, ip_address: str, install_path: str
|
|
|
await _update_progress("error", f"Service restart failed: {stderr[:200]}")
|
|
|
return
|
|
|
|
|
|
+ # Step 6: Restart kiosk browser to load updated frontend
|
|
|
+ await _update_progress("updating", "Restarting kiosk browser...")
|
|
|
+ rc, _, stderr = await _run_ssh_command(
|
|
|
+ ip_address,
|
|
|
+ "sudo /usr/bin/systemctl restart getty@tty1.service",
|
|
|
+ private_key,
|
|
|
+ )
|
|
|
+ if rc != 0:
|
|
|
+ # Non-fatal — kiosk may not be set up on all devices
|
|
|
+ logger.warning("SpoolBuddy %s: kiosk restart failed (non-fatal): %s", device_id, stderr[:200])
|
|
|
+
|
|
|
await _update_progress("complete", "Update complete, daemon restarting...")
|
|
|
logger.info("SpoolBuddy %s: SSH update complete (branch=%s)", device_id, branch)
|
|
|
|