From 6d1896052dfbc5e3e0ca3537adfe0a1d53077b73 Mon Sep 17 00:00:00 2001 From: konradSC Date: Thu, 28 Sep 2017 00:01:58 -0400 Subject: [PATCH] Update to use curl instead of ssh (#2856) SSH method never worked. I submitted the wrong file. --- .../scripts/app/servers/resources/file_cache.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/install/scripts/app/servers/resources/file_cache.lua b/resources/install/scripts/app/servers/resources/file_cache.lua index 960a66611d..6a82dbc935 100644 --- a/resources/install/scripts/app/servers/resources/file_cache.lua +++ b/resources/install/scripts/app/servers/resources/file_cache.lua @@ -76,11 +76,11 @@ end if (cache_updated) then for key,row in pairs(servers) do - if (row.method == "ssh") then - api_command_argument = api_command_argument:gsub("%%20", " "); - cmd = [[ ssh ]]..row.username..[[@]]..row.hostname..[[ " ]]..api_command_argument..[["]]; - freeswitch.consoleLog("INFO", "[notice] command: ".. cmd .. "\n"); - os.execute(cmd); + if (row.method == "curl") then + api_command_argument = api_command_argument:gsub(" ", "%%20"); + url = [[http://]]..row.username..[[:]]..row.password..[[@]]..row.hostname..[[:]]..row.port..[[/webapi/luarun?app/servers/resources/clear_cache.lua%20]]..api_command_argument; + os.execute("curl "..url); + freeswitch.consoleLog("INFO", "[notice] curl ".. url .. " \n"); end end end