You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/cmd
Aaron Klotz d915e0054c cmd/tailscaled: change Windows service shutdown and add optional event logging
Once a stop request is received and the service updates its status to `svc.StopPending`,
it should continue running *until the shutdown sequence is complete*, and then
return out of `(*ipnService).Execute`, which automatically sends a `svc.Stopped`
notification to Windows.

To make this happen, I changed the loop so that it runs until `doneCh` is
closed, and then returns. I also removed a spurious `svc.StopPending` notification
that the Windows Service Control Manager might be interpreting as a request for
more time to shut down.

Finally, I added some optional logging that sends a record of service notifications
to the Windows event log, allowing us to more easily correlate with any Service
Control Manager errors that are sent to the same log.

Change-Id: I5b596122e5e89c4c655fe747a612a52cb4e8f1e0
Signed-off-by: Aaron Klotz <aaron@tailscale.com>
3 years ago
..
addlicense cmd/addlicense: add command to add licenseheaders to generated code 3 years ago
cloner all: use any instead of interface{} 3 years ago
derper cmd/derper: add --stun-port flag 3 years ago
derpprobe all: use any instead of interface{} 3 years ago
hello all: use strings.Cut even more 3 years ago
mkpkg cmd/mkpkg: use package flag (#4373) 3 years ago
nginx-auth cmd/nginx-auth: maintainer scripts and tailnet checking (#4460) 3 years ago
printdep cmd/printdep: add flag to print out Go toolchain tarball URL 3 years ago
proxy-to-grafana client/tailscale: move/copy all package funcs to new LocalClient type 3 years ago
speedtest cmd: upgrade to ffcli v3 3 years ago
tailscale client/tailscale: move/copy all package funcs to new LocalClient type 3 years ago
tailscaled cmd/tailscaled: change Windows service shutdown and add optional event logging 3 years ago
testcontrol all: use any instead of interface{} 3 years ago
tsshd tempfork: temporarily fork gliderlabs/ssh and x/crypto/ssh 3 years ago