Skip to content

Commit 3084bbf

Browse files
authored
Fixes mino url for windows users (#277)
1 parent 4fea08a commit 3084bbf

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

start

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
#!/bin/bash
22
trap "echo -ne '\nstopping container...' && docker stop refinery-gateway > /dev/null 2>&1 && echo -ne '\t\t [done]\n'" EXIT
33

4-
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)
4+
unameOut="$(uname -s)"
5+
nameOut="$(whoami)"
6+
7+
if [ "$nameOut" == "jens" ]; then
8+
unameOut="jens"
9+
fi
10+
11+
case "${unameOut}" in
12+
#special case for jens machine
13+
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);;
14+
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);;
15+
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);;
16+
esac
517

618
echo -ne 'stopping old container...'
719
docker stop refinery-gateway > /dev/null 2>&1

0 commit comments

Comments
 (0)