parameters: (self)
docstring: Start the daemon
docstring_summary: Start the daemon
docstring_tokens: Start the daemon
function: def start(self):
          """
          Start the daemon
          """
          # Check for a pidfile to see if the daemon already runs
          try:
              pf = open(self.pidfile,'r')
              pid = int(pf.read().strip())
              pf.close()
          except IOError:
              pid = None
             
          if pid:
              message = "pidfile %s already exist. Daemon already running?\n"
              print(message % str(self.pidfile), file=sys.stderr)
              sys.exit(1)
          
          # Start the daemon
          self.daemonize()  
          self.run()
function_tokens: def start ( self ) : # Check for a pidfile to see if the daemon already runs try : pf = open ( self . pidfile , 'r' ) pid = int ( pf . read ( ) . strip ( ) ) pf . close ( ) except IOError : pid = None if pid : message = "pidfile %s already exist. Daemon already running?\n" print ( message % str ( self . pidfile ) , file = sys . stderr ) sys . exit ( 1 ) # Start the daemon self . daemonize ( ) self . run ( )