Skip to content

Commit

Permalink
Merge pull request #158 from brnv/master
Browse files Browse the repository at this point in the history
Add method to get service property
  • Loading branch information
lucab committed May 19, 2016
2 parents 67b9427 + bc17057 commit 209fe3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dbus/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ func (c *Conn) GetUnitProperty(unit string, propertyName string) (*Property, err
return c.getProperty(unit, "org.freedesktop.systemd1.Unit", propertyName)
}

// GetServiceProperty returns property for given service name and property name
func (c *Conn) GetServiceProperty(service string, propertyName string) (*Property, error) {
return c.getProperty(service, "org.freedesktop.systemd1.Service", propertyName)
}

// GetUnitTypeProperties returns the extra properties for a unit, specific to the unit type.
// Valid values for unitType: Service, Socket, Target, Device, Mount, Automount, Snapshot, Timer, Swap, Path, Slice, Scope
// return "dbus.Error: Unknown interface" if the unitType is not the correct type of the unit
Expand Down

0 comments on commit 209fe3f

Please sign in to comment.