Class: PushyDaemon::Daemon

Inherits:
Object
  • Object
show all
Defined in:
lib/pushyd/daemon.rb

Class Method Summary collapse

Class Method Details

.runObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/pushyd/daemon.rb', line 4

def self.run
  # Create a new proxy, and dump its configuration
  Proxy.new

  # Backup infinite loop in case shout does nothing
  loop do
    sleep 1
  end

rescue EndpointConnectionError, ShouterInterrupted => e
  abort "EXITING #{e.class}: #{e.message}"
rescue Errno::EACCES, StandardError => e
  abort "EXITING #{e.class}: #{e.message} \n #{e.backtrace.to_yaml}"
end