Skip to content

Commit 22b1663

Browse files
fix(enroll.nu): default agent name to 'demo-agent'
JWTs minted from the DVLS UI without an explicit name in the dialog do not carry a `jet_agent_name` claim, and the agent's `up` subcommand requires `--name`. Pass a sensible default so the demo helper works on any JWT, and let the caller override: nu enroll.nu "<JWT>" nu enroll.nu "<JWT>" my-agent
1 parent e3cfe35 commit 22b1663

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

enroll.nu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# matching the project's smoke-test setup, then starts the agent service in
99
# the foreground so the demo can show the QUIC connection log live.
1010

11-
def main [jwt: string] {
11+
def main [jwt: string, name: string = "demo-agent"] {
1212
let agent = "D:\\dgw-pr2\\target\\release\\devolutions-agent.exe"
1313
let agent_dir = "C:\\ProgramData\\Devolutions\\Agent"
1414
let cert_dir = $"($agent_dir)\\certs"
@@ -24,7 +24,7 @@ def main [jwt: string] {
2424
}
2525

2626
print "==> Bootstrapping agent (devolutions-agent up)"
27-
^$agent up --enrollment-string $jwt --advertise-routes "10.0.0.0/8,192.168.0.0/16" --advertise-domains "it-help.ninja"
27+
^$agent up --enrollment-string $jwt --name $name --advertise-routes "10.0.0.0/8,192.168.0.0/16" --advertise-domains "it-help.ninja"
2828

2929
print "==> Starting agent service (foreground, Ctrl-C to stop)"
3030
^$agent run

0 commit comments

Comments
 (0)