balena-supervisor/gosuper/systemd/systemd.go
Pablo Carranza Velez fc4b9656cd Switch to glide for Go dependencies
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-30 23:46:16 -07:00

26 lines
471 B
Go

package systemd
import (
"log"
"github.com/coreos/go-systemd/dbus"
"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.Printf("Failed to connect to host system bus: %s", err)
}
if Dbus, err = dbus.New(); err != nil {
log.Printf("Failed to connect to host DBUS: %s", err)
}
}