Housekeeping

This commit is contained in:
maziggy
2026-03-23 15:44:49 +01:00
parent 382daef6e2
commit 364b02b8ac
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -225,7 +225,13 @@ 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
# Step 6: Clear browser cache and restart kiosk
# Remove Chromium's Service Worker + cache storage to prevent stale frontend
await _run_ssh_command(
ip_address,
"sudo find /home -maxdepth 5 -path '*/chromium/Default/Service Worker' -type d -exec rm -rf {} + 2>/dev/null; true",
private_key,
)
rc, _, stderr = await _run_ssh_command(
ip_address,
"sudo /usr/bin/systemctl restart getty@tty1.service",
+1
View File
@@ -377,6 +377,7 @@ create_spoolbuddy_user() {
cat > /etc/sudoers.d/spoolbuddy << 'SUDOERS'
spoolbuddy ALL=(root) NOPASSWD: /usr/bin/systemctl restart spoolbuddy.service
spoolbuddy ALL=(root) NOPASSWD: /usr/bin/systemctl restart getty@tty1.service
spoolbuddy ALL=(root) NOPASSWD: /usr/bin/find /home -maxdepth 5 *
SUDOERS
chmod 440 /etc/sudoers.d/spoolbuddy
success "Sudoers entries created for service and kiosk restart"