open TV script

This commit is contained in:
phyusin
2018-09-14 10:15:05 +06:30
parent 57adb09162
commit 9ac2044337
3 changed files with 32 additions and 5 deletions

View File

@@ -184,6 +184,15 @@ class HomeController < ApplicationController
render :json => {:status=> "Success", :url => root_path }.to_json
end
def run_teamviewer
if File.directory?("/opt/teamviewer")
output = IO.popen('/opt/teamviewer/tv_bin/script/teamviewer')
render :json => {:status=> true}
else
render :json => {:status=> false}
end
end
private
# Never trust parameters from the scary internet, only allow the white list through.