lib/dogids/reload.rb in dogids-cli-0.0.23 vs lib/dogids/reload.rb in dogids-cli-0.0.24
- old
+ new
@@ -6,14 +6,15 @@
# Reload the specified environment
# TODO add environments
# @param [string] app_name
def reload(app_name = nil)
+ ssh_address = get_config_url("dev","dev")
if yes?("-----> Reload development? [no]")
reload_development_machine
+ restart_lamp(ssh_address, "dogids")
elsif yes?("-----> Restart LAMP stack? [no]")
- ssh_address = get_config_url("dev","dev")
restart_lamp(ssh_address, "dogids")
elsif yes?("-----> Restart LB and LAMP stack? [no]")
restart_all
elsif yes?("-----> Update Vagrant Box? (NOT RECOMMENDED) [no]")
update_vagrant_box
@@ -45,11 +46,11 @@
# Restarts HAProxy, Apache, HHVM, and MySQL
def restart_all
dev_machines = get_config_url("dev")
dev_machines.each do |key,dev_machine|
ssh_address = get_config_url("dev",dev_machine)
- lamp_restart_command(dev_machine, "dogids") if dev_machine == dev
- lb_restart_command(dev_machine, "dogids") if dev_machine == lb
+ restart_lamp(ssh_address, "dogids") if dev_machine == dev
+ restart_lb(ssh_address, "dogids") if dev_machine == lb
end
end
def restart_lamp(ssh_address,user)
Net::SSH.start(ssh_address, "dogids") do |ssh|