mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-21 10:43:36 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user