Example #1
0
  def __init__( self, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null', openLog = True ):
    Daemon.__init__( self, Config.getInstance().pidfile, stdin, stdout, stderr )

    # Set the threshold for the first generation to 3
    gc.set_threshold( 3 )

    self.config   = Config.getInstance()
    self.netstat  = NetworkParser()
    self.triggers = []
    self.lock     = threading.Lock()
    
    # Initialize logging
    if openLog is True:
      logging.basicConfig( level    = logging.INFO,
                           format   = '[%(asctime)s] [%(levelname)s] %(message)s',
                           filename = self.config.logfile,
                           filemode = 'a' )
Example #2
0
 def stop(self):
   logging.info( "Giskard daemon stopped." )
   Daemon.stop( self )
Example #3
0
 def start(self):
   logging.info( "Giskard daemon started." )
   Daemon.start( self )