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 | |
echo 'Provisioning Complete:' $1 $2 $3 |
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 | |
echo 'Starting Provision: lb1' | |
sudo apt-get update | |
sudo apt-get install -y nginx | |
sudo service nginx stop | |
sudo rm -rf /etc/nginx/sites-enabled/default | |
sudo touch /etc/nginx/sites-enabled/default | |
echo "upstream testapp { | |
server 10.0.0.11; |
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 | |
echo 'Starting Provision: web'$1 | |
sudo apt-get update | |
sudo apt-get install -y nginx | |
echo "<h1>Machine: web"$1"</h1>" >> /usr/share/nginx/html/index.html | |
echo 'Provision web'$1 'complete' |
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
function showdifference($string1, $string2) { | |
// Both strings are split up by spaces, each word is now an item in an array. | |
$string1_array = explode(" ", $string1); | |
$string2_array = explode(" ", $string2); | |
// We will count both arrays to see which is the largest (used later). | |
$s1_count = count($string1_array); | |
$s2_count = count($string2_array); |