def start(self):
        # Check for a pidfile to see if the daemon already runs
        try:
            pidf = file(self.pidfile, 'r')
            pid = int(pidf.read().strip())
            pidf.close()
        except IOError:
            pid = None

        if pid:
            sys.stderr.write("pidfile {0} already exists.\n".format(self.pidfile))
            sys.exit(1)

        # Start the daemon
        self.daemonize()
        self.run()
Start the daemon
dataset/ETHPy150Open felskrone/salt-eventsd/salteventsd/daemon.py/Daemon.start