Enhance installation and uninstallation scripts with user-friendly messages, add polkit and sudoers configuration for service management, and improve service restart handling in API endpoints.

This commit is contained in:
Lloyd
2026-02-24 11:33:21 +00:00
parent aa75fac7f2
commit 74914541f2
4 changed files with 99 additions and 42 deletions
+2 -2
View File
@@ -491,8 +491,8 @@ class APIEndpoints:
import time
time.sleep(2) # Give time for response to be sent
try:
# Use systemctl without sudo - polkit rules allow the repeater user to restart the service
subprocess.run(['systemctl', 'restart', 'pymc-repeater'], check=False)
from repeater.service_utils import restart_service
restart_service()
except Exception as e:
logger.error(f"Failed to restart service: {e}")