@@ -84,42 +84,42 @@ func (c *Conn) runJob(job string, args ...interface{}) (string, error) {
8484// has been removed too. skipped indicates that a job was skipped because it
8585// didn't apply to the units current state.
8686func (c * Conn ) StartUnit (name string , mode string ) (string , error ) {
87- return c .runJob ("StartUnit" , name , mode )
87+ return c .runJob ("org.freedesktop.systemd1.Manager. StartUnit" , name , mode )
8888}
8989
9090// StopUnit is similar to StartUnit but stops the specified unit rather
9191// than starting it.
9292func (c * Conn ) StopUnit (name string , mode string ) (string , error ) {
93- return c .runJob ("StopUnit" , name , mode )
93+ return c .runJob ("org.freedesktop.systemd1.Manager. StopUnit" , name , mode )
9494}
9595
9696// ReloadUnit reloads a unit. Reloading is done only if the unit is already running and fails otherwise.
9797func (c * Conn ) ReloadUnit (name string , mode string ) (string , error ) {
98- return c .runJob ("ReloadUnit" , name , mode )
98+ return c .runJob ("org.freedesktop.systemd1.Manager. ReloadUnit" , name , mode )
9999}
100100
101101// RestartUnit restarts a service. If a service is restarted that isn't
102102// running it will be started.
103103func (c * Conn ) RestartUnit (name string , mode string ) (string , error ) {
104- return c .runJob ("RestartUnit" , name , mode )
104+ return c .runJob ("org.freedesktop.systemd1.Manager. RestartUnit" , name , mode )
105105}
106106
107107// TryRestartUnit is like RestartUnit, except that a service that isn't running
108108// is not affected by the restart.
109109func (c * Conn ) TryRestartUnit (name string , mode string ) (string , error ) {
110- return c .runJob ("TryRestartUnit" , name , mode )
110+ return c .runJob ("org.freedesktop.systemd1.Manager. TryRestartUnit" , name , mode )
111111}
112112
113113// ReloadOrRestart attempts a reload if the unit supports it and use a restart
114114// otherwise.
115115func (c * Conn ) ReloadOrRestartUnit (name string , mode string ) (string , error ) {
116- return c .runJob ("ReloadOrRestartUnit" , name , mode )
116+ return c .runJob ("org.freedesktop.systemd1.Manager. ReloadOrRestartUnit" , name , mode )
117117}
118118
119119// ReloadOrTryRestart attempts a reload if the unit supports it and use a "Try"
120120// flavored restart otherwise.
121121func (c * Conn ) ReloadOrTryRestartUnit (name string , mode string ) (string , error ) {
122- return c .runJob ("ReloadOrTryRestartUnit" , name , mode )
122+ return c .runJob ("org.freedesktop.systemd1.Manager. ReloadOrTryRestartUnit" , name , mode )
123123}
124124
125125// StartTransientUnit() may be used to create and start a transient unit, which
@@ -131,13 +131,13 @@ func (c *Conn) StartTransientUnit(name string, mode string, properties ...Proper
131131 // the dbus interface for this method does not use the last argument and
132132 // should simply be given an empty list. We use a concrete type here
133133 // (instead of the more appropriate interface{}) to satisfy the dbus library.
134- return c .runJob ("StartTransientUnit" , name , mode , properties , make ([]string , 0 ))
134+ return c .runJob ("org.freedesktop.systemd1.Manager. StartTransientUnit" , name , mode , properties , make ([]string , 0 ))
135135}
136136
137137// KillUnit takes the unit name and a UNIX signal number to send. All of the unit's
138138// processes are killed.
139139func (c * Conn ) KillUnit (name string , signal int32 ) {
140- c .sysobj .Call ("KillUnit" , 0 , name , "all" , signal ).Store ()
140+ c .sysobj .Call ("org.freedesktop.systemd1.Manager. KillUnit" , 0 , name , "all" , signal ).Store ()
141141}
142142
143143// GetUnitProperties takes the unit name and returns all of its dbus object properties.
@@ -169,7 +169,7 @@ func (c *Conn) GetUnitProperties(unit string) (map[string]interface{}, error) {
169169// be more unit names loaded than actual units behind them.
170170func (c * Conn ) ListUnits () ([]UnitStatus , error ) {
171171 result := make ([][]interface {}, 0 )
172- err := c .sysobj .Call ("ListUnits" , 0 ).Store (& result )
172+ err := c .sysobj .Call ("org.freedesktop.systemd1.Manager. ListUnits" , 0 ).Store (& result )
173173 if err != nil {
174174 return nil , err
175175 }
@@ -226,7 +226,7 @@ func (c *Conn) EnableUnitFiles(files []string, runtime bool, force bool) (bool,
226226 var carries_install_info bool
227227
228228 result := make ([][]interface {}, 0 )
229- err := c .sysobj .Call ("EnableUnitFiles" , 0 , files , runtime , force ).Store (& carries_install_info , & result )
229+ err := c .sysobj .Call ("org.freedesktop.systemd1.Manager. EnableUnitFiles" , 0 , files , runtime , force ).Store (& carries_install_info , & result )
230230 if err != nil {
231231 return false , nil , err
232232 }
@@ -259,5 +259,5 @@ type EnableUnitFileChange struct {
259259// Reload instructs systemd to scan for and reload unit files. This is
260260// equivalent to a 'systemctl daemon-reload'.
261261func (c * Conn ) Reload () (string , error ) {
262- return c .runJob ("Reload" )
262+ return c .runJob ("org.freedesktop.systemd1.Manager. Reload" )
263263}
0 commit comments