Warn if the executable of the service being installed could be overwritten by other system users
Fixes #2579 Until this is handled by `kardianos/service`
This commit is contained in:
parent
0b559bb54f
commit
7462961980
|
@ -93,6 +93,9 @@ func main() {
|
||||||
dlog.Fatal(err)
|
dlog.Fatal(err)
|
||||||
}
|
}
|
||||||
if *svcFlag == "install" {
|
if *svcFlag == "install" {
|
||||||
|
if fullexecpath, err := os.Executable(); err == nil {
|
||||||
|
WarnIfMaybeWritableByOtherUsers(fullexecpath)
|
||||||
|
}
|
||||||
dlog.Notice("Installed as a service. Use `-service start` to start")
|
dlog.Notice("Installed as a service. Use `-service start` to start")
|
||||||
} else if *svcFlag == "uninstall" {
|
} else if *svcFlag == "uninstall" {
|
||||||
dlog.Notice("Service uninstalled")
|
dlog.Notice("Service uninstalled")
|
||||||
|
|
Loading…
Reference in New Issue