diff --git a/ovos_utils/system.py b/ovos_utils/system.py index 69b7b4f5..0c1ab738 100644 --- a/ovos_utils/system.py +++ b/ovos_utils/system.py @@ -92,9 +92,10 @@ def restart_service(service_name, sudo=True): @param service_name: name of service to restart @param sudo: use sudo when calling systemctl """ - cmd = f'systemctl restart {service_name}' if sudo: - cmd = f"sudo {cmd}" + cmd = f"systemctl restart --user {service_name}" + else: + cmd = f'sudo systemctl restart {service_name}' subprocess.call(cmd, shell=True)