I have a script (myscript.rb) like below:
require 'daemons'
Daemons.run_proc 'myproc', dir_mode: :normal, dir: '/path/to/pids' do # Daemon code here...
end
So, I can check the daemon's status in console by ruby myscript.rb status
.
But I need to show the daemon's status in a web page (Rails), like:
Daemon status: <%= "Daemon status here..."
How can this be done?