From f710d1cb20c8252a93d79d5341176143a865af91 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 29 Nov 2022 21:08:44 -0800 Subject: [PATCH] cmd/tailscale/cli: add set --unattended on Windows Fixes #6567 Change-Id: I8cb57196c601466401f8602eb50456e7cf7c31ef Signed-off-by: Brad Fitzpatrick --- cmd/tailscale/cli/set.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/tailscale/cli/set.go b/cmd/tailscale/cli/set.go index 8f7d6a32b..9a78fee8e 100644 --- a/cmd/tailscale/cli/set.go +++ b/cmd/tailscale/cli/set.go @@ -44,6 +44,7 @@ type setArgsT struct { opUser string acceptedRisks string profileName string + forceDaemon bool } func newSetFlagSet(goos string, setArgs *setArgsT) *flag.FlagSet { @@ -62,6 +63,11 @@ func newSetFlagSet(goos string, setArgs *setArgsT) *flag.FlagSet { if safesocket.GOOSUsesPeerCreds(goos) { setf.StringVar(&setArgs.opUser, "operator", "", "Unix username to allow to operate on tailscaled without sudo") } + switch goos { + case "windows": + setf.BoolVar(&setArgs.forceDaemon, "unattended", false, "run in \"Unattended Mode\" where Tailscale keeps running even after the current GUI user logs out (Windows-only)") + } + registerAcceptRiskFlag(setf, &setArgs.acceptedRisks) return setf } @@ -91,6 +97,7 @@ func runSet(ctx context.Context, args []string) (retErr error) { RunSSH: setArgs.runSSH, Hostname: setArgs.hostname, OperatorUser: setArgs.opUser, + ForceDaemon: setArgs.forceDaemon, }, }