Skip to content

Commit

Permalink
default home
Browse files Browse the repository at this point in the history
  • Loading branch information
briankelleher committed Feb 14, 2016
1 parent 37f5aea commit 0a1f1a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 144 deletions.
144 changes: 0 additions & 144 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -149,83 +149,6 @@ Vagrant.configure(2) do |config|
echo Ready to develop! Visit #{private_ip}!
SHELL

# Shell provisioning
# config.vm.provision "shell", inline: <<-SHELL
# echo -e "If you need to see debug information, remove the -q (quiet) flags and > /dev/null's from commands."

# echo -e "Installing Apache"
# sudo yum install -y -q httpd

# echo -e "Apache installed. Configuring Apache."
# sudo chmod 666 /etc/httpd/conf/httpd.conf
# sudo sed -i '0,/AllowOverride All/s/AllowOverride None/AllowOverride All/g' /etc/httpd/conf/httpd.conf
# sudo sed -i '0,/#ServerName www.example.com:80/s/#ServerName www.example.com:80/ServerName localhost/g' /etc/httpd/conf/httpd.conf

# echo -e "Apache configured. Starting Apache"
# sudo service httpd start

# echo -e "Apache started. Installing MySQL"
# sudo yum install -y -q mysql-server

# echo -e "MySQL installed. Starting MySQL"
# sudo service mysqld start > /dev/null

# echo -e "MySQL started. Installing PHP"
# sudo yum install -y -q php php-mysql php-gd php-fpm php-imap php-pear php-pspell php-xmlrpc php-xml php-mbstring

# echo -e "PHP installed. Setting up MySQL database."
# sudo service httpd restart > /dev/null
# sudo mysql -u root --password="" -e 'CREATE DATABASE IF NOT EXISTS #{db_name}'
# sudo mysql -u root --password="" -e 'GRANT ALL PRIVILEGES ON `#{db_name}`.* TO #{db_user}@localhost IDENTIFIED BY "#{db_password}"'
# sudo mysql -u root --password="" -e 'FLUSH PRIVILEGES'

# echo -e "Databases setup."

# echo -e "Downloading and setting up WP-CLI."
# curl -O -s https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
# sudo chmod +x wp-cli.phar
# sudo mv wp-cli.phar /usr/local/bin/wp

# cd #{guest_wordpress_install}

# echo -e "WP-CLI setup. Finishing wordpress install."
# sudo /usr/local/bin/wp core install --url=#{private_ip} --title='#{wp_site_title}' --admin_user=#{admin_name} --admin_password=#{admin_pw} --admin_email=#{admin_email} --path=#{guest_wordpress_install}
# /usr/local/bin/wp theme is-installed #{theme_slug_to_activate} --url=#{private_ip}
# if [ $? -eq 0 ]
# then
# echo "Theme present, activating now"
# /usr/local/bin/wp theme activate #{theme_slug_to_activate} --url=#{private_ip}
# else
# echo "Specified theme not installed. Using default."
# fi
# for plugin in #{plugins_activate}
# do
# /usr/local/bin/wp plugin is-installed $plugin --url=#{private_ip}
# if [ $? -eq 1 ]
# then
# /usr/local/bin/wp plugin install $plugin --activate --url=#{private_ip}
# else
# /usr/local/bin/wp plugin activate $plugin --url=#{private_ip}
# fi
# done
# for plugin in #{plugins_deactivate}
# do
# /usr/local/bin/wp plugin is-installed $plugin --url=#{private_ip}
# if [ $? -eq 1 ]
# then
# /usr/local/bin/wp plugin install $plugin --url=#{private_ip}
# echo "$plugin was not activated."
# fi
# done

# gunzip < /vagrant/db/provision.sql.gz | mysql -u #{db_user} -p'#{db_password}' #{db_name}

# sudo service httpd restart > /dev/null
# sudo service mysqld restart > /dev/null
# echo Ready to develop! Visit #{private_ip}!
# SHELL


# Vagrant Triggers
# config.trigger.after :up do
# run_remote "sudo service httpd restart > /dev/null"
Expand All @@ -242,71 +165,4 @@ Vagrant.configure(2) do |config|
# run_remote "sudo service mysqld restart > /dev/null"
# end



# Guest written hacky fix for GuestAdditions on CentOS 6.5
# https://github.com/dotless-de/vagrant-vbguest/issues/141
# module UpdateCentOSKernel
# class UpdateCentOSKernelPlugin < Vagrant.plugin('2')
# name 'update_centos_kernel_plugin'

# # update yum after first boot when provisioning
# action_hook(:update_yum, :machine_action_up) do |hook|
# hook.after(VagrantPlugins::ProviderVirtualBox::Action::CheckGuestAdditions, UpdateCentOSKernel::Middleware::KernelUpdater)
# end
# end

# module Middleware
# class KernelUpdater
# @@rebooted = {};

# def initialize(app, env)
# @app = app
# end

# def call(env)
# @env = env
# @vm = env[:machine]
# @ui = env[:ui]
# self.update_kernel()
# end

# def update_kernel()
# if !@@rebooted[@vm.id]
# @@rebooted[@vm.id] = true

# @ui.info 'Updating kernel'
# @vm.communicate.sudo('yum install -q -y kernel kernel-devel') do |type, data|
# if type == :stderr
# @ui.error(data);
# else
# @ui.info(data);
# end
# end

# self.reboot()
# end
# end

# def reboot()
# @ui.info('Rebooting after updating kernel')
# simle_reboot = Vagrant::Action::Builder.new.tap do |b|
# b.use Vagrant::Action::Builtin::Call, Vagrant::Action::Builtin::GracefulHalt, :poweroff, :running do |env2, b2|
# if !env2[:result]
# b2.use VagrantPlugins::ProviderVirtualBox::Action::ForcedHalt
# end
# end

# b.use VagrantPlugins::ProviderVirtualBox::Action::Boot
# if defined?(Vagrant::Action::Builtin::WaitForCommunicator)
# b.use Vagrant::Action::Builtin::WaitForCommunicator, [:starting, :running]
# end
# b.use VagrantVbguest::Middleware
# end
# @env[:action_runner].run(simle_reboot, @env)
# end
# end
# end
# end

end
2 changes: 2 additions & 0 deletions www/wp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
define('WP_HOME', 'http://' . $host . '');
define('WP_SITEURL', 'http://' . $host . '');
}else{
require_once($config);
}
Expand Down

0 comments on commit 0a1f1a2

Please sign in to comment.