author | terom@fixme.fi |
Mon, 15 Sep 2008 00:53:59 +0300 | |
changeset 23 | 67e71e9170e5 |
child 25 | 6c0a53a512d8 |
permissions | -rw-r--r-- |
23
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
1 |
from zope.interface import implements |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
2 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
3 |
from twisted.python import usage |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
4 |
from twisted.plugin import IPlugin |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
5 |
from twisted.application.service import IServiceMaker |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
6 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
7 |
from twisted.application import internet |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
8 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
9 |
from fixbot import api, logwatch |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
10 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
11 |
class LogwatchOptions (api.ClientOptions) : |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
12 |
optParameters = [ |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
13 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
14 |
] |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
15 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
16 |
optFlags = [ |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
17 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
18 |
] |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
19 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
20 |
class MyServiceMaker (object) : |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
21 |
implements(IServiceMaker, IPlugin) |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
22 |
tapname = "fixbot_logwatch" |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
23 |
description = "A SysAdmin's best friend (Logwatcher)" |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
24 |
options = LogwatchOptions |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
25 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
26 |
def makeService (self, config) : |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
27 |
return logwatch.makeService(config) |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
28 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
29 |
serviceMaker = MyServiceMaker() |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
30 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
31 |