Add ability for service to report the system managing the service (#147)
* Add ability for service to report the system managing the service * Clarify that the output of SystemName should return the same value as Platform in most cases * Rename SystemName to Platform to match the rest of the package * be a little more clear in the Platform comment
This commit is contained in:
committed by
Daniel Theophanes
parent
2b860c2dd7
commit
b1866cf769
+2
-2
@@ -13,7 +13,7 @@ type linuxSystemService struct {
|
||||
name string
|
||||
detect func() bool
|
||||
interactive func() bool
|
||||
new func(i Interface, c *Config) (Service, error)
|
||||
new func(i Interface, platform string, c *Config) (Service, error)
|
||||
}
|
||||
|
||||
func (sc linuxSystemService) String() string {
|
||||
@@ -26,7 +26,7 @@ func (sc linuxSystemService) Interactive() bool {
|
||||
return sc.interactive()
|
||||
}
|
||||
func (sc linuxSystemService) New(i Interface, c *Config) (Service, error) {
|
||||
return sc.new(i, c)
|
||||
return sc.new(i, sc.String(), c)
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
Reference in New Issue
Block a user