bugfix service installers

This commit is contained in:
AJ ONeal 2020-11-05 16:05:47 -07:00
parent 8d73901067
commit d174b4739f
5 changed files with 7 additions and 7 deletions

View File

@ -99,7 +99,7 @@ func main() {
if len(os.Args) >= 2 { if len(os.Args) >= 2 {
if "install" == os.Args[1] { if "install" == os.Args[1] {
if err := service.Install(); nil != err { if err := service.Install(serviceName, serviceDesc); nil != err {
fmt.Fprintf(os.Stderr, "%v", err) fmt.Fprintf(os.Stderr, "%v", err)
} }
return return

View File

@ -5,6 +5,6 @@ import (
) )
// Install ensures a systemd service is active // Install ensures a systemd service is active
func Install() error { func Install(name, desc string) error {
return errors.New("'install' not supported for system services on this platform") return errors.New("not supported for system services on this platform")
} }

View File

@ -7,6 +7,6 @@ import (
) )
// Install ensures a windows service is active // Install ensures a windows service is active
func Install() error { func Install(name, desc string) error {
return errors.New("not supported for system services on this platform") return errors.New("not supported for system services on this platform")
} }

View File

@ -17,7 +17,7 @@ func Install(name, desc string) error {
return err return err
} }
return installService(name, desc, exepath) return install(name, desc, exepath)
} }
func getExecPath(exepath string) (string, error) { func getExecPath(exepath string) (string, error) {
@ -38,7 +38,7 @@ func getExecPath(exepath string) (string, error) {
p += ".exe" p += ".exe"
fi, err = os.Stat(p) fi, err = os.Stat(p)
if nil != err { if nil != err {
return err return "", err
} }
} }

View File

@ -5,6 +5,6 @@ import (
) )
// Install ensures a systemd service is active // Install ensures a systemd service is active
func Install() error { func Install(name, desc string) error {
return errors.New("'install' not supported for system services on this platform") return errors.New("'install' not supported for system services on this platform")
} }