author | Tero Marttila <terom@fixme.fi> |
Thu, 04 Feb 2010 19:40:51 +0200 | |
changeset 40 | b9fdb7710768 |
parent 25 | 6c0a53a512d8 |
child 43 | 78bc61c677d8 |
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 |
|
40
b9fdb7710768
move logwatch*.py to separate fixbot.logwatch package, and move logwatch_sources to etc/fixbot-logwatch.py
Tero Marttila <terom@fixme.fi>
parents:
25
diff
changeset
|
9 |
from fixbot import api |
b9fdb7710768
move logwatch*.py to separate fixbot.logwatch package, and move logwatch_sources to etc/fixbot-logwatch.py
Tero Marttila <terom@fixme.fi>
parents:
25
diff
changeset
|
10 |
from fixbot.logwatch import logwatch |
23
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
11 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
12 |
class LogwatchOptions (api.ClientOptions) : |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
13 |
optParameters = [ |
40
b9fdb7710768
move logwatch*.py to separate fixbot.logwatch package, and move logwatch_sources to etc/fixbot-logwatch.py
Tero Marttila <terom@fixme.fi>
parents:
25
diff
changeset
|
14 |
("logwatch-sources", None, None, "See etc/fixbot-logwatch.py"), |
23
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 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
17 |
optFlags = [ |
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 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
21 |
class MyServiceMaker (object) : |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
22 |
implements(IServiceMaker, IPlugin) |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
23 |
tapname = "fixbot_logwatch" |
25
6c0a53a512d8
make fifo.py less spammy, tweak other descriptions/init.d
Tero Marttila <terom@fixme.fi>
parents:
23
diff
changeset
|
24 |
description = "FixBot (Logwatcher component)" |
23
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
25 |
options = LogwatchOptions |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
26 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
27 |
def makeService (self, config) : |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
28 |
return logwatch.makeService(config) |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
29 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
30 |
serviceMaker = MyServiceMaker() |
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
31 |
|
67e71e9170e5
rename plugin fixbot -> fixbot_nexus, add fixbot_logwatch plugin, fix some random bugs
terom@fixme.fi
parents:
diff
changeset
|
32 |