From 9de5b5d2c432c9239c7a51eb12e8264430337f13 Mon Sep 17 00:00:00 2001 From: JWittmeyer Date: Tue, 26 Nov 2024 13:17:40 +0100 Subject: [PATCH] Fixes mino url for windows users --- start | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/start b/start index c1d531d6..204f2a84 100755 --- a/start +++ b/start @@ -1,7 +1,19 @@ #!/bin/bash trap "echo -ne '\nstopping container...' && docker stop refinery-gateway > /dev/null 2>&1 && echo -ne '\t\t [done]\n'" EXIT -HOST_IP=$(docker network inspect bridge --format='{{json .IPAM.Config}}' | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | tail -1) +unameOut="$(uname -s)" +nameOut="$(whoami)" + +if [ "$nameOut" == "jens" ]; then + unameOut="jens" +fi + +case "${unameOut}" in + #special case for jens machine + jens*) HOST_IP=$(ip a | grep "inet " | grep -v 127.0.0.1 | tac | head -1 | grep -o -E "[0-9]+.[0-9]+.[0-9]+.[0-9]+" | head -1);; + Linux*) HOST_IP=$(ip a | grep "inet " | grep -v 127.0.0.1| head -1 | grep -o -E "[0-9]+.[0-9]+.[0-9]+.[0-9]+" | head -1);; + Darwin*) HOST_IP=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | grep -o -E "[0-9]+.[0-9]+.[0-9]+.[0-9]+" | head -1);; +esac echo -ne 'stopping old container...' docker stop refinery-gateway > /dev/null 2>&1