bugfix service installers
This commit is contained in:
parent
8d73901067
commit
d174b4739f
|
@ -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
|
||||||
|
|
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue