Serve installers from the hub; document the private-repo install
The repo is private, so anonymous raw URLs return 404. The hub now serves /install-probe.sh (and /install.sh) from its own checkout, open even with UI_PASSWORD, and the Add probe command fetches from there. The installers still ask for a read-only token to clone. Docs use Gitea's "Authorization: token" header and give a git-clone fallback for the hub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
54a765510a
commit
efd3836945
10 changed files with 60 additions and 24 deletions
|
|
@ -13,7 +13,8 @@ export function mount(root, ctx) {
|
|||
|
||||
function installCommand(info, token) {
|
||||
const hub = info.hub_url || location.origin;
|
||||
return `curl -fsSL ${info.install_url} | HUB_URL=${hub} PROBE_TOKEN=${token} bash`;
|
||||
const url = info.install_url || `${hub}/install-probe.sh`;
|
||||
return `curl -fsSL ${url} | HUB_URL=${hub} PROBE_TOKEN=${token} bash`;
|
||||
}
|
||||
|
||||
function commandBlock(cmd) {
|
||||
|
|
@ -87,7 +88,7 @@ function list(root, ctx) {
|
|||
function showInstall(p) {
|
||||
const cmd = installCommand(info, p.token);
|
||||
const dlg = modal(`Install “${p.name}”`, el('div', { style: 'display:grid;gap:12px' },
|
||||
el('p', { style: 'margin:0' }, 'Run this on the machine that will be the probe. It starts on boot and keeps running. On Linux hosts it uses Docker (installed if needed). On macOS and inside Proxmox LXC containers it installs natively as a system service; there, Linux needs root: put sudo env before HUB_URL.'),
|
||||
el('p', { style: 'margin:0' }, 'Run this on the machine that will be the probe. It starts on boot and keeps running. On Linux hosts it uses Docker (installed if needed). On macOS and inside Proxmox LXC containers it installs natively as a system service; on Linux that needs root, so outside an LXC put sudo env before HUB_URL. If the git repo is private, the installer asks for a read-only token.'),
|
||||
commandBlock(cmd),
|
||||
el('p.small.muted', { style: 'margin:0' }, `The probe reports to ${info.hub_url || location.origin}. If that address isn't reachable from the probe, change HUB_URL in the command. The command is also on the probe's page.`),
|
||||
), { wide: true, footer: [el('a.btn', { href: `/probes/${p.id}`, onclick: () => dlg.close() }, 'Open probe'), el('button.btn.primary', { type: 'button', onclick: () => dlg.close() }, 'Done')] });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue