agent
This commit is contained in:
23
agent/scripts/install-agent.sh
Normal file
23
agent/scripts/install-agent.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
AGENT_BASE_URL="${AGENT_BASE_URL:-https://robot.package}"
|
||||
ARCH="${ARCH:-$(dpkg --print-architecture)}"
|
||||
AGENT_URL="${AGENT_URL:-${AGENT_BASE_URL%/}/packages/agent/latest.deb?arch=${ARCH}}"
|
||||
TMP_DEB="/tmp/local-installer-agent.deb"
|
||||
|
||||
echo "Downloading Local Installer Agent..."
|
||||
curl -fL "$AGENT_URL" -o "$TMP_DEB"
|
||||
|
||||
echo "Installing Local Installer Agent..."
|
||||
apt install -y "$TMP_DEB"
|
||||
|
||||
echo "Starting Local Installer Agent..."
|
||||
systemctl enable local-installer-agent
|
||||
systemctl restart local-installer-agent
|
||||
|
||||
echo "Checking Agent..."
|
||||
curl -fsSL http://127.0.0.1:5010/health
|
||||
|
||||
echo ""
|
||||
echo "Local Installer Agent installed successfully."
|
||||
Reference in New Issue
Block a user