()
| 1145 | } |
| 1146 | |
| 1147 | func (c *Manager) DeleteSystemd() error { |
| 1148 | ctx := context.TODO() |
| 1149 | conn, err := systemdDbus.NewWithContext(ctx) |
| 1150 | if err != nil { |
| 1151 | return err |
| 1152 | } |
| 1153 | defer conn.Close() |
| 1154 | group := systemdUnitFromPath(c.path) |
| 1155 | ch := make(chan string) |
| 1156 | _, err = conn.StopUnitContext(ctx, group, "replace", ch) |
| 1157 | if err != nil { |
| 1158 | return err |
| 1159 | } |
| 1160 | <-ch |
| 1161 | return nil |
| 1162 | } |
| 1163 | |
| 1164 | func newSystemdProperty(name string, units interface{}) systemdDbus.Property { |
| 1165 | return systemdDbus.Property{ |
no test coverage detected