(self)
Start the daemon.
Start the daemon.
Start the daemon .
def start(self):
        """Start the daemon."""

        # Check for a pidfile to see if the daemon already runs
        try:
            with open(self.pidfile,'r') as pf:

                pid = int(pf.read().strip())
        except IOError:
            pid = None
    
        if pid:
            message = "pidfile {0} already exist. " + \
                    "Daemon already running?\n"
            sys.stderr.write(message.format(self.pidfile))
            sys.exit(1)
        
        # Start the daemon
        self.daemonize()
        self.run()
def start ( self ) : # Check for a pidfile to see if the daemon already runs try : with open ( self . pidfile , 'r' ) as pf : pid = int ( pf . read ( ) . strip ( ) ) except IOError : pid = None if pid : message = "pidfile {0} already exist. " + "Daemon already running?\n" sys . stderr . write ( message . format ( self . pidfile ) ) sys . exit ( 1 ) # Start the daemon self . daemonize ( ) self . run ( )