feat(release): v0.3.4 - in-place installer upgrades, mutual exclusion guards, 2FA, and telemetry cap
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Canceled after 0s
CI Test Suite / Run Component Tests & Pipeline Verification (push) Canceled after 1m13s

This commit is contained in:
2026-09-27 19:13:22 +02:00
parent 702ca985d2
commit 3234acf435
8 changed files with 310 additions and 23 deletions
+20
View File
@@ -7,6 +7,26 @@ ENROLL_SECRET="${2:-}"
INSTALL_DIR="/opt/logar-client"
CONFIG_DIR="/etc/logar"
# 1. Mutual Exclusion Check: Deny installation if LOGAR Server is present
if [ -f "/opt/logar-server/Server" ] || [ -f "/etc/systemd/system/logar-server.service" ]; then
echo "[-] Error: LOGAR Server is already installed on this machine." >&2
echo "[-] LOGAR Client cannot be installed on a host where LOGAR Server is present (LOGAR Server includes built-in log collection)." >&2
echo "[-] Please uninstall LOGAR Server first before installing LOGAR Client." >&2
exit 1
fi
# 2. Existing LOGAR Client Detection for In-Place Update Mode
IS_UPDATE=0
if [ -f "${INSTALL_DIR}/Linux_Client" ] || [ -f "/etc/systemd/system/logar-client.service" ]; then
IS_UPDATE=1
echo "[*] Existing LOGAR Client installation detected. Performing in-place upgrade..."
fi
if [ "${IS_UPDATE}" -eq 1 ] && command -v systemctl >/dev/null 2>&1; then
echo "[*] Stopping LOGAR Client service for upgrade..."
systemctl stop logar-client.service || true
fi
echo "[+] Installing LOGAR Client..."
mkdir -p "${INSTALL_DIR}" "${CONFIG_DIR}/certs"
chmod 700 "${CONFIG_DIR}/certs"