mirror of
https://github.com/myronblair/jarvis
synced 2026-07-28 00:34:35 -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:
@@ -1,16 +1,23 @@
|
||||
#!/bin/bash
|
||||
# JARVIS Agent Installer — one-liner for any Linux host:
|
||||
# curl -sk https://jarvis.orbishosting.com/install-agent.sh | bash -s <hostname> <agent_type>
|
||||
# curl -sk http://jarvis.orbishosting.com:1972/agent/install.sh | bash -s <hostname> <agent_type>
|
||||
#
|
||||
# agent_type: linux | proxmox | homeassistant
|
||||
# Example: curl -sk https://jarvis.orbishosting.com/install-agent.sh | bash -s myserver linux
|
||||
# Example: curl -sk http://jarvis.orbishosting.com:1972/agent/install.sh | bash -s myserver linux
|
||||
#
|
||||
# On the LAN, set JARVIS_URL to the direct internal address instead (faster,
|
||||
# doesn't hairpin through Cloudflare): JARVIS_URL=http://10.48.200.211 curl ... | bash -s ...
|
||||
|
||||
set -e
|
||||
|
||||
HOSTNAME_ARG="${1:-$(hostname -s)}"
|
||||
AGENT_TYPE="${2:-linux}"
|
||||
JARVIS_URL="https://165.22.1.228"
|
||||
JARVIS_HOST="jarvis.orbishosting.com"
|
||||
# Fixed 2026-07-07: jarvis.orbishosting.com on the default port isn't reachable
|
||||
# from outside the LAN at all (no FortiGate VIP forwards it) — :1972 is the
|
||||
# confirmed-working external path (same fix as the GitHub webhook and the
|
||||
# Windows agent installer).
|
||||
JARVIS_URL="${JARVIS_URL:-http://jarvis.orbishosting.com:1972}"
|
||||
JARVIS_HOST=""
|
||||
INSTALL_DIR="/opt/jarvis-agent"
|
||||
CONFIG_DIR="/etc/jarvis-agent"
|
||||
STATE_DIR="/var/lib/jarvis-agent"
|
||||
@@ -38,7 +45,7 @@ mkdir -p "$INSTALL_DIR" "$CONFIG_DIR" "$STATE_DIR"
|
||||
|
||||
# ── Download agent ─────────────────────────────────────────────────────────────
|
||||
echo "Downloading agent..."
|
||||
curl -sk -H "Host: $JARVIS_HOST" "$JARVIS_URL/agent/jarvis-agent.py" -o "$INSTALL_DIR/jarvis-agent.py"
|
||||
curl -sk "$JARVIS_URL/agent/jarvis-agent.py" -o "$INSTALL_DIR/jarvis-agent.py"
|
||||
cp "$INSTALL_DIR/jarvis-agent.py" /usr/local/bin/jarvis-agent.py
|
||||
chmod +x "$INSTALL_DIR/jarvis-agent.py" /usr/local/bin/jarvis-agent.py
|
||||
|
||||
@@ -50,7 +57,7 @@ else
|
||||
{
|
||||
"jarvis_url": "$JARVIS_URL",
|
||||
"host_header": "$JARVIS_HOST",
|
||||
"ssl_verify": false,
|
||||
"ssl_verify": true,
|
||||
"registration_key": "$REG_KEY",
|
||||
"hostname": "$HOSTNAME_ARG",
|
||||
"agent_type": "$AGENT_TYPE",
|
||||
|
||||
Reference in New Issue
Block a user