mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-07 17:33:16 +02:00
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:
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user