From 2e7e6507f6c3de0ef346cd2434ec8fcc3b4b89fb Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 4 Mar 2026 10:38:12 -0500 Subject: [PATCH] refactor: remove redundant IP address retrieval logic from localagi.sh --- ct/localagi.sh | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/ct/localagi.sh b/ct/localagi.sh index 678028961..83a98dca2 100644 --- a/ct/localagi.sh +++ b/ct/localagi.sh @@ -107,21 +107,3 @@ description msg_ok "Completed successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" - -if [[ -z "${IP:-}" ]]; then - IP=$(pct exec "$CTID" -- sh -c "hostname -I 2>/dev/null | tr ' ' '\n' | grep -E '^[0-9]+\.' | head -n1") -fi -if [[ -z "${IP:-}" ]]; then - IP=$(pct exec "$CTID" -- sh -c "hostname -I 2>/dev/null | tr ' ' '\n' | grep -E ':' | head -n1") -fi - -URL_HOST="${IP:-}" -if [[ -n "${URL_HOST}" && "${URL_HOST}" == *:* ]]; then - URL_HOST="[${URL_HOST}]" -fi -if [[ -z "${URL_HOST}" ]]; then - msg_warn "Unable to determine container IP automatically" - echo -e "${TAB}${GATEWAY}${BGN}http://:3000${CL}" -else - echo -e "${TAB}${GATEWAY}${BGN}http://${URL_HOST}:3000${CL}" -fi