-

Sign up for a GitHub account Sign in All Gists colby / - Created October 28, 2014 Code Revisions 1 /.sunken-menu-group /.sunken-menu-contents Embed HTTPS SSH You can clone with HTTPS or SSH . Download Gist /.only-with-full-nav View - - Raw File suppressed. Click to show. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #!/bin/bash # Current VM this script is running on. host=$1 # If there's no match its safe to assume the cluster hasnt been added yet. if [[ ! -n $(grep 'Vagrantfile' /etc/hosts) ]] then echo "Updating VM hostfile with cluster information." echo -e "\n# Automatically added via Vagrantfile" >> /etc/hosts # Add everything from HOSTS but $host grep -v "$host" /vagrant/HOSTS >> /etc/hosts else echo "VM hostfile is up-to-date." fi ...

Linked on 2014-10-28 22:08:15 | Similar Links