From aa864eeac462311af8fcc7fd72a8a8429625fb56 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Wed, 23 Sep 2026 19:25:24 +0900 Subject: [PATCH] localinfra: replace `knotadmin` script with `knot admin` Signed-off-by: Seongmin Lee --- localinfra/knot2.Dockerfile | 5 +++++ .../scripts/knotadmin/create-invite-code.sh | 17 ----------------- 2 files changed, 5 insertions(+), 17 deletions(-) delete mode 100755 localinfra/scripts/knotadmin/create-invite-code.sh diff --git a/localinfra/knot2.Dockerfile b/localinfra/knot2.Dockerfile index 13a0adde1..4f3136838 100644 --- a/localinfra/knot2.Dockerfile +++ b/localinfra/knot2.Dockerfile @@ -31,6 +31,11 @@ COPY --from=builder /usr/local/bin/knot-server /usr/local/bin/knot-server COPY <<'EOF' /usr/local/bin/knot-entrypoint.sh #!/bin/sh set -eu +# trust caddy's `tls internal` root system-wide, so `knot-server admin` verifies it. +if [ -f /etc/ssl/certs/tngl.crt ]; then + cp /etc/ssl/certs/tngl.crt /usr/local/share/ca-certificates/tngl.crt + update-ca-certificates >/dev/null +fi [ -z "${KNOT_ADMINS:-}" ] && [ -r /shared/owner-did ] && \ export KNOT_ADMINS="$(cat /shared/owner-did)" : "${KNOT_ADMINS:?set via env or /shared/owner-did}" diff --git a/localinfra/scripts/knotadmin/create-invite-code.sh b/localinfra/scripts/knotadmin/create-invite-code.sh deleted file mode 100755 index 2c677ad6e..000000000 --- a/localinfra/scripts/knotadmin/create-invite-code.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -set -o errexit -set -o nounset -set -o pipefail - -KNOT_HOSTNAME=knot2.tngl.boltless.dev -KNOT_LEGACY_ADMIN_SECRET=super-strong-devonly-key - -curl \ - --fail \ - --silent \ - --show-error \ - --request POST \ - --user "admin:${KNOT_LEGACY_ADMIN_SECRET}" \ - --header "Content-Type: application/json" \ - --data '{"useCount": 1}' \ - "https://${KNOT_HOSTNAME}/xrpc/org.tangled.temp.server.createInviteCode" | jq --raw-output '.code' -- 2.51.2