5790bae9a0833340ff2d9f109cb9c77f29d728b5
Fixed two critical issues preventing Electron update from completing: 1. cd permission denied error Problem: Script tried to `cd /home/kiosk/kiosk-app` which failed with "Permission denied" because the directory has restricted permissions (drwxr-x---) and the regular user can't enter it. Fix: Use `sudo -u kiosk bash -c "cd '/home/kiosk/kiosk-app' && npm install ..."` instead of separate cd + npm commands. This runs both commands as the kiosk user in a single bash session, avoiding the permission issue. 2. Wrong service name (kiosk vs lightdm) Problem: Scripts tried to stop/start "kiosk" service which doesn't exist on the user's system. Their kiosk runs under lightdm service. Fix: Changed all references from: - `systemctl stop/start kiosk` → `systemctl stop/start lightdm` - "Restart kiosk service" → "Restart kiosk display" - `journalctl -u kiosk` → `journalctl -u lightdm` Additional fixes: - Updated file checks: `[ -d ]` → `sudo test -d` for restricted directories - Applied fixes to both update paths: successful install and failure/restore - Updated both update_electron.sh and install_kiosk_0.9.2-6.sh Changes in both scripts: - update_electron() function: removed cd, added bash -c wrapper, changed service name - Backup restore paths: same fixes applied - Success path: updated restart prompts and service checks - Failure path: fixed restore process with proper directory access The update should now complete successfully without permission errors.
Languages
Shell
94.1%
JavaScript
4.7%
HTML
0.9%
CSS
0.3%