def SvcDoRun(self): self.ReportServiceStatus(win32service.SERVICE_RUNNING) running = PlexConnect.startup() while running: running = PlexConnect.run(timeout=10) PlexConnect.shutdown() self.ReportServiceStatus(win32service.SERVICE_STOPPED)
def SvcStop(self): self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) PlexConnect.cmdShutdown()