Sha256: 3d644e7608667dff27f05adb7c4c725f80b70f33fccfa025afc8dc5fe0cafe1d

Contents?: true

Size: 425 Bytes

Versions: 10

Compression:

Stored size: 425 Bytes

Contents

require 'daemons'

daemon_dir  = Dir.pwd + '/.daemon'
Dir::mkdir(daemon_dir) unless File.directory?(daemon_dir)

options = {
  :dir        => daemon_dir,
  :log_output => true,
  :multiple   => false, # only allow one daemon to run at a time
  :monitor    => true
}

require 'mad_chatter'
config = MadChatter::Config.init
server = MadChatter::Server.new(config)

Daemons.run_proc('Mad Chatter', options) do
  server.start
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mad_chatter-0.3.4 lib/mad_chatter/daemon.rb
mad_chatter-0.3.3 lib/mad_chatter/daemon.rb
mad_chatter-0.3.2 lib/mad_chatter/daemon.rb
mad_chatter-0.3.1 lib/mad_chatter/daemon.rb
mad_chatter-0.3.0 lib/mad_chatter/daemon.rb
mad_chatter-0.2.9 lib/mad_chatter/daemon.rb
mad_chatter-0.2.8 lib/mad_chatter/daemon.rb
mad_chatter-0.2.7 lib/mad_chatter/daemon.rb
mad_chatter-0.2.6 lib/mad_chatter/daemon.rb
mad_chatter-0.2.5 lib/mad_chatter/daemon.rb