# Allow the kiosk service (running as altitude-admin) to manage Wi-Fi,
# trigger reboot/shutdown, quit Plymouth, and apply package updates
# without an interactive prompt. SETENV is required for apt-get because
# the kiosk passes DEBIAN_FRONTEND=noninteractive.
altitude-admin ALL=(root) NOPASSWD: /usr/sbin/reboot, /usr/sbin/poweroff, /usr/sbin/shutdown, /usr/bin/nmcli, /usr/bin/plymouth
altitude-admin ALL=(root) NOPASSWD: SETENV: /usr/bin/apt-get
# systemd-run lets the in-app updater launch apt-get in its own transient
# scope/cgroup so the postinst's `systemctl restart altitude-kiosk.service`
# does not SIGTERM apt itself (which left dpkg in an interrupted state on
# < 0.3.9 and required `sudo dpkg --configure -a` to recover).
altitude-admin ALL=(root) NOPASSWD: SETENV: /usr/bin/systemd-run
