agent
This commit is contained in:
10
agent/packaging/DEBIAN/control
Normal file
10
agent/packaging/DEBIAN/control
Normal 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.
|
||||
21
agent/packaging/DEBIAN/postinst
Normal file
21
agent/packaging/DEBIAN/postinst
Normal 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
|
||||
6
agent/packaging/DEBIAN/postrm
Normal file
6
agent/packaging/DEBIAN/postrm
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
exit 0
|
||||
8
agent/packaging/DEBIAN/prerm
Normal file
8
agent/packaging/DEBIAN/prerm
Normal 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
|
||||
Reference in New Issue
Block a user