export APP_GITEA_MIRROR_PORT="4322" local_ips=$(hostname --all-ip-addresses 2> /dev/null) || local_ips="" export APP_GITEA_MIRROR_LOCAL_IPS="${local_ips}" # Создайте URLs с http:// и портом, разделенными запятыми. ips_with_port=$(for ip in $local_ips; do # Оберните адреса IPv6 в [] if [[ "$ip" == *:* ]]; then echo -n "http://[$ip]:$APP_GITEA_MIRROR_PORT," else echo -n "http://$ip:$APP_GITEA_MIRROR_PORT," fi done | sed 's/,$//') export APP_GITEA_MIRROR_LOCAL_URLS="${ips_with_port}"