Open josepjaume opened 10 years ago
We should leverage the usage of the daemons gem to create a binary for robinhood that automatically loads the configuration from a Robinhood file and starts robinhood. Something like this would tentatively work:
daemons
Robinhood
#!/usr/bin/env ruby require 'rubygems' require 'daemons' require 'fileutils' options = { dir_mode: :normal, monitor: true, multiple: true, app_name: 'robinhood', log_output: true } Daemons.run_proc('robinhood', options) do require 'Robinhood' Robinhood.start! end
Remember we should think about being able to specify a pids dir from the ENV when calling the executable:
ENV
PIDS_DIR=tmp/pids/robinhood LOGFILE=log/robinhood.log robinhood start
We should leverage the usage of the
daemons
gem to create a binary for robinhood that automatically loads the configuration from aRobinhood
file and starts robinhood. Something like this would tentatively work: