OpenVoiceOS / ovos-utils

Apache License 2.0
3 stars 9 forks source link

"systemctl restart" not working when using with ovos-phal-plugin-system #259

Closed goldyfruit closed 2 months ago

goldyfruit commented 2 months ago

systemctl restart doesn't work, there is an issue with DBUS.

Jul 07 12:59:50 mark2 ovos_PHAL_admin[2506]: 2024-07-07 12:59:50.633 - PHAL_admin - ovos_bus_client.apis.gui:_pages2uri:376 - DEBUG - Resolved pages: ['file:///home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_PHAL_plugin_system/ui/Restart.qml']
Jul 07 12:59:50 mark2 ovos_PHAL_admin[2506]: 2024-07-07 12:59:50.635 - PHAL_admin - ovos_bus_client.apis.gui:_normalize_page_name:387 - WARNING - Deprecation version=0.1.0. Caller=ovos_PHAL_plugin_system:303. GUI resources should specify a resource name and not a file path.
Jul 07 12:59:50 mark2 ovos_PHAL_admin[2506]: 2024-07-07 12:59:50.637 - PHAL_admin - ovos_bus_client.apis.gui:show_pages:448 - DEBUG - Updating gui data: {'__from': 'ovos-PHAL-plugin-system'}
Jul 07 12:59:50 mark2 systemctl[2526]: Failed to connect to bus: No medium found
mike99mac commented 2 months ago

sudo systemctl restart Too few arguments.

goldyfruit commented 2 months ago

Its an issue with the PHAL system plugin as when running the restart_service from ovos_utils it works.

(ovos) goldyfruit@mark2:~ $ python
Python 3.11.2 (main, May  2 2024, 11:59:08) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ovos_utils.system import restart_service
>>> restart_service("ovos.service", sudo=False, user=True)
>>>