This commit is contained in:
2026-05-22 16:47:51 +07:00
parent 190d2418da
commit 582960cc32
39 changed files with 2307 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
Package: local-installer-agent
Version: 0.1.0
Section: utils
Priority: optional
Architecture: amd64
Maintainer: Robot Team <admin@robot.package>
Depends: python3, python3-venv, python3-pip, curl
Description: Local Installer Agent for robot.installer
A local background service that installs, updates, and removes trusted .deb apps
from robot.package on the user's Linux machine.

View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -e
mkdir -p /var/lib/local-installer-agent
mkdir -p /var/log/local-installer-agent
mkdir -p /var/cache/local-installer-agent/packages
cd /opt/local-installer-agent
if [ ! -d "venv" ]; then
python3 -m venv venv
fi
./venv/bin/pip install --upgrade pip
./venv/bin/pip install -r requirements.txt
systemctl daemon-reload
systemctl enable local-installer-agent
systemctl restart local-installer-agent
exit 0

View File

@@ -0,0 +1,6 @@
#!/bin/bash
set -e
systemctl daemon-reload
exit 0

View File

@@ -0,0 +1,8 @@
#!/bin/bash
set -e
if systemctl is-active --quiet local-installer-agent; then
systemctl stop local-installer-agent
fi
exit 0

View File

@@ -0,0 +1,13 @@
[Unit]
Description=Local Installer Agent
After=network.target
[Service]
WorkingDirectory=/opt/local-installer-agent
ExecStart=/opt/local-installer-agent/venv/bin/python -m uvicorn app.main:app --host 127.0.0.1 --port 5010
Restart=always
User=root
EnvironmentFile=/etc/local-installer-agent/agent.env
[Install]
WantedBy=multi-user.target