From 4cbc7a6a0e6c8811d65af868e3fede9af6afe588 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 31 Dec 2014 16:41:05 +0800 Subject: [PATCH] fix --- app/helpers/registered_module_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/helpers/registered_module_helper.rb b/app/helpers/registered_module_helper.rb index 828005b..cb27af3 100644 --- a/app/helpers/registered_module_helper.rb +++ b/app/helpers/registered_module_helper.rb @@ -15,6 +15,16 @@ module RegisteredModuleHelper site.installed_modules << im site.save end + restart_remote_server(site) + end + + + def restart_remote_server(site) + uri = URI.parse("http://#{site.site_domain}/") + http = Net::HTTP.new(uri.host,uri.port) + request = Net::HTTP::Post.new("/store/restart_server_after_install") + request.body = params_to_send.to_query + response = http.request(request) end def uninstall_on_server(site, mod)