Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes mino url for windows users #277

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion start
Original file line number Diff line number Diff line change
@@ -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
Expand Down