2020-03-21 14:43:02 +00:00
|
|
|
//+build !windows,!solaris,!darwin
|
|
|
|
|
|
|
|
package dbus
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
const defaultSystemBusAddress = "unix:path=/var/run/dbus/system_bus_socket"
|
|
|
|
|
|
|
|
func getSystemBusPlatformAddress() string {
|
|
|
|
address := os.Getenv("DBUS_SYSTEM_BUS_ADDRESS")
|
|
|
|
if address != "" {
|
2020-08-19 15:57:52 +00:00
|
|
|
return address
|
2020-03-21 14:43:02 +00:00
|
|
|
}
|
|
|
|
return defaultSystemBusAddress
|
2020-08-19 15:57:52 +00:00
|
|
|
}
|