mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-30 02:28:53 +00:00
26 lines
565 B
Go
26 lines
565 B
Go
package systemd
|
|
|
|
import (
|
|
"log"
|
|
|
|
"resin-supervisor/gosuper/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus"
|
|
"resin-supervisor/gosuper/Godeps/_workspace/src/github.com/coreos/go-systemd/login1"
|
|
)
|
|
|
|
var (
|
|
// Logind Systemd Login1 connection
|
|
Logind *login1.Conn
|
|
// Dbus Systems Dbus connection
|
|
Dbus *dbus.Conn
|
|
)
|
|
|
|
func init() {
|
|
var err error
|
|
if Logind, err = login1.New(); err != nil {
|
|
log.Fatalf("Failed to connect to host system bus: %s", err)
|
|
}
|
|
if Dbus, err = dbus.New(); err != nil {
|
|
log.Fatalf("Failed to connect to host DBUS: %s", err)
|
|
}
|
|
}
|