def delete(self): self.stop() if sys.platform == "win32": run("sc delete %s" % self.name) elif sys.platform.startswith('linux'): svc_locate = "/etc/init.d/%s" % self.name if os.path.exists(svc_locate): fs.remove(svc_locate) run("chkconfig --del" % self.name) else: pass
def delete(self): os.system("chkconfig --del %s" % self.svc_name) if os.path.exists(self.svc_loct): fs.remove(self.svc_loct)