From 5c951b61cac9c92590d6dba364d11ddfdf26f7a5 Mon Sep 17 00:00:00 2001 From: Zeus Date: Sun, 22 Feb 2026 12:47:10 +0000 Subject: [PATCH] feat: auto-calculate port from UID in install script Port formula: 8100 + (UID mod 100) * 10 --- scripts/install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index dcb46a7..dc5e9e5 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -7,6 +7,9 @@ set -e INSTALL_DIR="/opt/argus" SKILL_LINK="/olymp/shared/skills/argus" +# Calculate port from UID: 8100 + (UID mod 100) * 10 +ARGUS_PORT=$((8100 + ($(id -u) % 100) * 10)) + echo "╔════════════════════════════════════════╗" echo "║ Argus Installation ║" echo "╚════════════════════════════════════════╝" @@ -98,9 +101,9 @@ cat << 'HEARTBEAT' HEARTBEAT echo "──────────────────────────────────────────────────────────────────" echo -echo "Dashboard URLs (default port 8100):" -echo " - Dashboard: http://localhost:8100" -echo " - Datasette: http://localhost:8101" +echo "Dashboard URLs (based on UID $(id -u)):" +echo " - Dashboard: http://localhost:${ARGUS_PORT}" +echo " - Datasette: http://localhost:$((ARGUS_PORT + 1))" echo -echo "Set ARGUS_PORT to change (e.g., ARGUS_PORT=8200 for 8200/8201)" +echo "Port formula: ARGUS_PORT = 8100 + (UID mod 100) * 10" echo "══════════════════════════════════════════════════════════════════"