updated for unix build

This commit is contained in:
redanthrax 2022-06-22 13:53:50 -07:00
parent 66aca05028
commit e20edcc9ad
37 changed files with 1001 additions and 257 deletions

View file

@ -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 }

View 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
}