Created
August 17, 2015 12:51
-
-
Save jfklingler/aa9a3e34983109403295 to your computer and use it in GitHub Desktop.
Reset boot2docker network
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if_prefix=${VB_IF_PREFIX:-vboxnet} | |
if_name=$(ifconfig | grep $if_prefix | awk -F':' '{print $1}') | |
if [[ $if_name == "" ]]; then | |
echo "Couldn't find $if_prefix interface" >&2 | |
exit 1 | |
fi | |
sudo route delete -net 192.168.59 | |
sudo route -nv add -net 192.168.59 -interface $if_name | |
boot2docker stop | |
boot2docker start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment