1
0
mirror of https://github.com/DNSCrypt/dnscrypt-proxy.git synced 2025-01-21 03:15:47 +01:00

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:
Frank Denis 2024-02-20 02:23:49 +01:00
parent 0b559bb54f
commit 7462961980

View File

@ -93,6 +93,9 @@ func main() {
dlog.Fatal(err)
}
if *svcFlag == "install" {
if fullexecpath, err := os.Executable(); err == nil {
WarnIfMaybeWritableByOtherUsers(fullexecpath)
}
dlog.Notice("Installed as a service. Use `-service start` to start")
} else if *svcFlag == "uninstall" {
dlog.Notice("Service uninstalled")