feed-updater
683 Bytes
#!/usr/bin/env ruby
# This is the Noosfero feed updater controller script. It starts and stops the
# feed updater daemon, which is implemented in the FeedUpdater class.
#
# The role of this script is to just start/stop the daemon, write a PID file,
# etc. The actual feed update logic is in FeedUpdater.
require 'daemons'
NOOSFERO_ROOT = File.expand_path(File.dirname(__FILE__) + '/../')
options = {
:dir_mode => :normal,
:dir => File.dirname(__FILE__) + '/../tmp/pids',
:multiple => false,
:backtrace => true,
:monitor => true,
}
Daemons.run_proc('feed-updater', options) do
require NOOSFERO_ROOT + '/config/environment'
FeedUpdater.new.start
end