feat(dbus): Add D-Bus interface for managing software services
Introduce `InterfaceSoftwareServices` to handle service enable/disable actions, status, and availability via D-Bus. Consolidate `avahi` service configuration into the new interface by removing redundant logic from `revpi_config.py`. Signed-off-by: Sven Sager <s.sager@kunbus.com>
This commit is contained in:
@@ -435,18 +435,6 @@ class ConfigTxt:
|
||||
return self._config_txt_path
|
||||
|
||||
|
||||
def configure_avahi_daemon(action: ConfigActions):
|
||||
return_value = simple_systemd(action, "avahi-daemon.service")
|
||||
|
||||
# Post actions for avahi-daemon
|
||||
if action in (ConfigActions.ENABLE, ConfigActions.DISABLE):
|
||||
# Apply the enable/disable action to the avahi socket AFTER the service
|
||||
# unit, because a connected socket could interrupt stop
|
||||
simple_systemd(action, "avahi-daemon.socket")
|
||||
|
||||
return return_value
|
||||
|
||||
|
||||
def configure_bluetooth(action: ConfigActions):
|
||||
hci_device = join(LINUX_BT_CLASS_PATH, "hci0")
|
||||
bt_rfkill_index = get_rfkill_index(hci_device)
|
||||
|
||||
Reference in New Issue
Block a user