--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Mon Sep 15 00:31:12 2008 +0300
@@ -0,0 +1,7 @@
+syntax: regexp
+
+\.sw[po]$
+\.pyc$
+^twistd.(log|pid)$
+^twisted/plugins/dropin.cache$
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fixbot/api_secret.py.dist Mon Sep 15 00:31:12 2008 +0300
@@ -0,0 +1,5 @@
+# the shared static secret to use for API connections. This file shouldn't be world-readable
+
+# this should be a string
+secret = please replace me
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fixbot/logwatch_config.py.dist Mon Sep 15 00:31:12 2008 +0300
@@ -0,0 +1,19 @@
+import logwatch_filters as filters
+from logwatch_sources import *
+
+def sources () :
+ """
+ Return a sequence of LogSource objects
+ """
+
+ return (
+ Fifo("auth", "logs/auth.fifo", (
+ filters.sudo,
+ filters.cron_killer,
+ filters.all,
+ )),
+ Fifo("foo", "foo", (
+ filters.all,
+ )),
+ )
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/twisted/plugins/fixbot_plugin.py Mon Sep 15 00:31:12 2008 +0300
@@ -0,0 +1,39 @@
+from zope.interface import implements
+
+from twisted.python import usage
+from twisted.plugin import IPlugin
+from twisted.application.service import IServiceMaker
+
+from twisted.application import internet
+
+from fixbot import nexus
+
+class NexusOptions (usage.Options) :
+ optParameters = [
+# ( "uid", "u", "fixbot", "user to run as" ),
+# ( "gid", "g", "nogroup", "group to run as" ),
+ ( "irc-hostname", "s", "irc.fixme.fi", "IRC server hostname", ),
+ ( "irc-port", "p", 6667, "IRC server port", int ),
+ ( "irc-nickname", "n", "FixBotDev", "IRC nickname", ),
+ ( "irc-username", "U", "fixbot", "IRC username", ),
+ ( "irc-channel", "c", "#fixme-test", "IRC channel", ),
+ ( "api-listen", "l", "127.0.0.1", "address for API server to listen on" ),
+ ( "api-port", "P", 34888, "port for API server to listen on", int ),
+ ]
+
+ optFlags = [
+
+ ]
+
+class MyServiceMaker (object) :
+ implements(IServiceMaker, IPlugin)
+ tapname = "fixbot"
+ description = "A SysAdmin's best friend"
+ options = NexusOptions
+
+ def makeService (self, config) :
+ return nexus.makeService(config)
+
+serviceMaker = MyServiceMaker()
+
+