mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
Housekeeping
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user