class WcoHosting::Serverhost
def create_wordpress_volume app
def create_wordpress_volume app @obj = app ac = ActionController::Base.new ac.instance_variable_set( :@app, app ) ac.instance_variable_set( :@workdir, WORKDIR ) rendered_str = ac.render_to_string("wco_hosting/scripts/create_volume") Wco::Log.puts! rendered_str, 'create_volume rendered_str', obj: @obj file = Tempfile.new('prefix') file.write rendered_str file.close # puts! file.path, 'file.path' cmd = "scp #{file.path} #{ssh_host}:#{WORKDIR}/scripts/create_volume" do_exec cmd cmd = "ssh #{ssh_host} 'chmod a+x #{WORKDIR}/scripts/create_volume ; \ #{WORKDIR}/wco_hosting/scripts/create_volume ' " do_exec cmd end