mirror of
https://github.com/myronblair/jarvis
synced 2026-07-28 08:43:00 -05:00
Fix auto-detect agent install button: commands shown for Windows/Linux no longer use flags the scripts dont actually support (install-windows.ps1 has no -JarvisUrl/-Key params, install.sh has no --jarvis-url/--key flags), download links use the current page origin instead of a hardcoded URL thats unreachable from outside the LAN, Windows command reflects the new no-Python exe install, fixed the top-level install-agent.sh which still pointed at the pre-migration DO server IP (165.22.1.228) and would have failed outright
This commit is contained in:
@@ -438,8 +438,13 @@ function openAgentModal() {
|
||||
const content = document.getElementById('agentModalContent');
|
||||
const modal = document.getElementById('agentModal');
|
||||
const regKey = 'f846a9aaf7ce9a61742c63c87c4186052a71d2a580c65518';
|
||||
const baseUrl = 'https://jarvis.orbishosting.com/agent';
|
||||
const jUrl = window.location.origin;
|
||||
// Fixed 2026-07-07: this used to be hardcoded to https://jarvis.orbishosting.com/agent,
|
||||
// which isn't reachable from outside the LAN at all (no FortiGate VIP forwards the
|
||||
// default port there — confirmed HTTP:000). Using the current page's own origin
|
||||
// instead means the download link always matches wherever the visitor actually
|
||||
// reached this dashboard from, LAN or external.
|
||||
const baseUrl = jUrl + '/agent';
|
||||
|
||||
if (os === 'tablet') {
|
||||
title.textContent = '● JARVIS — TABLET / MOBILE';
|
||||
@@ -460,9 +465,12 @@ function openAgentModal() {
|
||||
const inst = {
|
||||
windows: {
|
||||
label:'Windows',
|
||||
cmd:'# Run PowerShell as Administrator:\nSet-ExecutionPolicy Bypass -Scope Process -Force\nInvoke-WebRequest -Uri "'+baseUrl+'/install-windows.ps1" -OutFile "$env:TEMP\\install.ps1"\n& "$env:TEMP\\install.ps1" -JarvisUrl '+jUrl+' -Key '+regKey,
|
||||
dl: baseUrl+'/install-windows.ps1',
|
||||
note:'Run PowerShell as Administrator. Installs as a Windows Task Scheduler service.'
|
||||
// install-windows.ps1 takes no parameters — it reads the reg key from
|
||||
// $env:JARVIS_REG_KEY and downloads the standalone exe itself (no
|
||||
// Python/pywin32 needed on the target machine as of the 2026-07-07 rebuild).
|
||||
cmd:'# Run PowerShell as Administrator:\n$env:JARVIS_REG_KEY=\''+regKey+'\'\nirm '+baseUrl+'/install-windows.ps1 | iex',
|
||||
dl: baseUrl+'/install-windows.exe',
|
||||
note:'Run PowerShell as Administrator. Installs as a real Windows Service (auto-starts at boot, no window to keep open).'
|
||||
},
|
||||
mac: {
|
||||
label:'macOS',
|
||||
@@ -472,15 +480,18 @@ function openAgentModal() {
|
||||
},
|
||||
linux: {
|
||||
label:'Linux',
|
||||
cmd:'curl -sSL '+baseUrl+'/install.sh | sudo bash -s -- \\\n --jarvis-url '+jUrl+' \\\n --key '+regKey,
|
||||
// install.sh takes positional args (hostname, agent_type) and reads the
|
||||
// JARVIS URL from an env var — the registration key is already baked in,
|
||||
// no --key flag exists.
|
||||
cmd:'curl -sSL '+baseUrl+'/install.sh | JARVIS_URL='+jUrl+' bash -s -- $(hostname) linux',
|
||||
dl: baseUrl+'/install.sh',
|
||||
note:'Run in terminal. Installs as a systemd service.'
|
||||
note:'Run in terminal (sudo). Installs as a systemd service.'
|
||||
},
|
||||
unknown: {
|
||||
label:'Your System',
|
||||
cmd:'# Browse installers:\nhttps://jarvis.orbishosting.com/agent/',
|
||||
dl: 'https://jarvis.orbishosting.com/agent/',
|
||||
note:'Choose your platform installer from the JARVIS agent directory.'
|
||||
cmd:'# Couldn\'t detect your OS automatically. Installers are at:\n'+baseUrl+'/install.sh (Linux)\n'+baseUrl+'/install-mac.sh (macOS)\n'+baseUrl+'/install-windows.ps1 (Windows)',
|
||||
dl: baseUrl+'/install.sh',
|
||||
note:'Auto-detection didn\'t recognize this browser/OS — pick the matching installer above.'
|
||||
}
|
||||
};
|
||||
const i = inst[os] || inst.unknown;
|
||||
|
||||
Reference in New Issue
Block a user