I am trying to run some commands remotely and SSH'ing in to the machine is not an option. What I am trying to do is setup a Sinatra app that runs some specific commands and streams the output through HTTP.
The sample action looks like this:
get "/log" do
`tail -f some.log`
end
1 As far as I've read, I need to use Unicorn (or Mongrel) because Thin does not support streaming data 2 I think I need to pipe the commands output through some kind of IO ruby object
I almost know how to do (1) but have no idea how to achieve (2).