terom@23: from zope.interface import implements terom@23: terom@23: from twisted.python import usage terom@23: from twisted.plugin import IPlugin terom@23: from twisted.application.service import IServiceMaker terom@23: terom@23: from twisted.application import internet terom@23: terom@62: from fixbot import api, module terom@47: from fixbot import logwatch terom@23: terom@23: class LogwatchOptions (api.ClientOptions) : terom@23: optParameters = [ terom@40: ("logwatch-sources", None, None, "See etc/fixbot-logwatch.py"), terom@23: ] terom@23: terom@23: optFlags = [ terom@23: terom@23: ] terom@23: terom@23: class MyServiceMaker (object) : terom@23: implements(IServiceMaker, IPlugin) terom@43: tapname = "fixbot-logwatch" terom@25: description = "FixBot (Logwatcher component)" terom@23: options = LogwatchOptions terom@23: terom@23: def makeService (self, config) : terom@62: return logwatch.makeService(config, api.amp.ClientProtocol) terom@23: terom@23: serviceMaker = MyServiceMaker() terom@23: terom@23: