#!/bin/sh # Lookup the Kitematic VM resolver for .dev domains echo "nameserver 172.17.42.1" > /etc/resolver/dev # Install virtualbox if [ -n "$INSTALL_VIRTUALBOX" ]; then /usr/sbin/installer -pkg $VIRTUALBOX_PKG_PATH -target / fi /bin/rm -rf /Library/LaunchAgents/com.kitematic.route.plist echo ' Label com.kitematic.route ProgramArguments /sbin/route -n add 172.17.0.0/16 192.168.59.103 KeepAlive RunAtLoad ServiceIPC UserName root LaunchOnlyOnce ' > /Library/LaunchAgents/com.kitematic.route.plist DIR=$(dirname "$0") USER=`w -h | sort -u -t' ' -k1,1 | awk '{print $1}'` sudo -u $USER $DIR/boot2docker init # Add entries to routing table for Kitematic VM /sbin/route delete 172.17.0.0/16 192.168.59.103 /sbin/route -n add 172.17.0.0/16 192.168.59.103