feat: apply configuration on start

This commit is contained in:
2025-05-17 22:28:56 +02:00
parent d8e047d58b
commit 9e6fcbdd74
11 changed files with 156 additions and 19 deletions

View File

@@ -11,11 +11,11 @@ import (
func WithDbus(fn func(*dbus.Conn) error) error {
conn, err := dbus.SystemBus()
if err != nil {
log.Printf("Failed to connect to system bus: %v", err)
log.Printf("[ERROR] Failed to connect to system bus: %v", err)
return err
}
if err := fn(conn); err != nil {
log.Print(err)
log.Printf("[ERROR] Failed to execute D-Bus function: %s", err)
return err
}
conn.Close()