From 681c528aff8abb87f29efffa9d174aff8d85c311 Mon Sep 17 00:00:00 2001 From: "courtmanr@gmail.com" Date: Wed, 4 Jun 2025 15:49:16 +0100 Subject: [PATCH] feat: auto-install polkit for sudoless updates in LXC containers - Add policykit-1 package to automatic dependency installation - Check for pkexec command availability before installing polkit - Enable sudoless update system to work in LXC environments - Improve compatibility with community Proxmox VE installation scripts This ensures that new installations (including via community scripts) automatically get polkit support for seamless web-based updates without requiring manual sudo commands. --- scripts/install-pulse.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/install-pulse.sh b/scripts/install-pulse.sh index f678e03fe..4c2b395b1 100755 --- a/scripts/install-pulse.sh +++ b/scripts/install-pulse.sh @@ -372,6 +372,11 @@ install_dependencies() { fi done + # Check for polkit separately since it's a package, not a command + if ! command -v pkexec &> /dev/null; then + missing_deps="$missing_deps policykit-1" + fi + if [ -n "$missing_deps" ]; then print_info "Installing:$missing_deps" apt-get install -y -qq $missing_deps || { print_error "Failed to install dependencies"; exit 1; } @@ -492,6 +497,9 @@ EOF setup_polkit_rule() { print_info "Setting up polkit rule for automatic updates..." + # Note: polkit is required for sudoless updates in the web interface + # Without this, users would need to manually restart the service after updates + # Create polkit rules directory if it doesn't exist mkdir -p /etc/polkit-1/rules.d