updated for unix build
This commit is contained in:
parent
66aca05028
commit
e20edcc9ad
37 changed files with 1001 additions and 257 deletions
|
|
@ -1,25 +0,0 @@
|
|||
package services
|
||||
|
||||
import (
|
||||
trmm "github.com/wh1te909/trmm-shared"
|
||||
rmm "github.com/amidaware/rmmagent/shared"
|
||||
"github.com/kardianos/service"
|
||||
)
|
||||
|
||||
func GetServiceDetail(name string) trmm.WindowsService { return trmm.WindowsService{} }
|
||||
|
||||
func ControlService(name, action string) rmm.WinSvcResp {
|
||||
return rmm.WinSvcResp{Success: false, ErrorMsg: "/na"}
|
||||
}
|
||||
|
||||
func EditService(name, startupType string) rmm.WinSvcResp {
|
||||
return rmm.WinSvcResp{Success: false, ErrorMsg: "/na"}
|
||||
}
|
||||
|
||||
func GetServices() []trmm.WindowsService { return []trmm.WindowsService{} }
|
||||
|
||||
func Start(_ service.Service) error { return nil }
|
||||
|
||||
func Stop(_ service.Service) error { return nil }
|
||||
|
||||
func InstallService() error { return nil }
|
||||
32
agent/services/services_unix.go
Normal file
32
agent/services/services_unix.go
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"github.com/kardianos/service"
|
||||
)
|
||||
|
||||
func GetServiceDetail(name string) Service { return Service{} }
|
||||
|
||||
func ControlService(name, action string) WinSvcResp {
|
||||
return WinSvcResp{Success: false, ErrorMsg: "/na"}
|
||||
}
|
||||
|
||||
func EditService(name, startupType string) WinSvcResp {
|
||||
return WinSvcResp{Success: false, ErrorMsg: "/na"}
|
||||
}
|
||||
|
||||
func GetServices() ([]Service, []error, error) {
|
||||
return []Service{}, []error{}, nil
|
||||
}
|
||||
|
||||
func Start(_ service.Service) error { return nil }
|
||||
|
||||
func Stop(_ service.Service) error { return nil }
|
||||
|
||||
func InstallService() error { return nil }
|
||||
|
||||
func GetServiceStatus(name string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue