This commit is contained in:
bee0005 2016-09-01 10:05:23 +00:00
parent 3c270311c3
commit ac25be1dc8

View File

@ -101,9 +101,7 @@ class VolumeController < ApplicationController
volume_name = params[:volume_name]
volume_name = volume_name.delete(' ')
puts "gluster volume stop " + volume_name
output = `sshpass -p#{@config["host_password"]} ssh #{@config["host_port"]} #{@config["host_user"]}@#{@config["host_ip"]} gluster volume stop #{volume_name}`
output = `sshpass -p#{@config["host_password"]} ssh #{@config["host_port"]} #{@config["host_user"]}@#{@config["host_ip"]} \n`
output = `sshpass -p#{@config["host_password"]} ssh #{@config["host_port"]} #{@config["host_user"]}@#{@config["host_ip"]} y`
output = `yes | sshpass -p#{@config["host_password"]} ssh #{@config["host_port"]} #{@config["host_user"]}@#{@config["host_ip"]} gluster volume stop #{volume_name}`
redirect_to '/volume/index'
end