# Nevow imports from twisted.application import service, internet, strports, app from twisted.web import server, static from twisted.python import failure from twisted.internet import reactor from Core import Utils, FlowCollector application = service.Application('TUMSFC') flowcollector = internet.UDPServer(9685, FlowCollector.flowCollector()) flowcollector.setServiceParent(application) ## TwistD bootstrap code nodaemon = 0 log = '/var/log/tums-fc.log' if len(sys.argv) > 1: if sys.argv[1] == "-n": nodaemon = 1 log = None if __name__ == '__main__': Utils.startTwisted(application, Settings.BaseDir, nodaemon, log, Settings.BaseDir, pidfile='/var/run/tums-fc.pid', appname="tumsfc")
reactor.callWhenRunning(xmlClient.checkKey, startTHIVE) myLang = lang.Text('en') application = service.Application('TUMS') tums = internet.TCPServer(9682, Realm.deploy((db, squidDb, myLang, messageHandler))) tumsSSL = internet.SSLServer( 9683, Realm.deploy((db, squidDb, myLang, messageHandler)), xmlrpc.ServerContextFactory()) thebe = internet.SSLServer(54321, thebeProto, xmlrpc.ServerContextFactory()) tums.setServiceParent(application) tumsSSL.setServiceParent(application) thebe.setServiceParent(application) ## TwistD bootstrap code nodaemon = 0 log = '/var/log/tums.log' if len(sys.argv) > 1: if sys.argv[1] == "-n": nodaemon = 1 log = None Utils.startTwisted(application, Settings.BaseDir, nodaemon, log, Settings.BaseDir, pidfile='/var/run/tums.pid')
reactor.callLater(1, xmlrpc.threadQueueLoop, xmlClient) reactor.callLater(120, xmlClient.selfChecks) reactor.callLater(300, xmlClient.glsaAutoCheck) def deploy(): return xmlrpc.server.Site(xmlrpc.ClientServer()) application = service.Application('TUMS') theberpc = internet.SSLServer(int(Settings.thebePort), deploy(), xmlrpc.ServerContextFactory()) flowcollector = internet.UDPServer(9685, FlowCollector.flowCollector()) tumsSSL = internet.SSLServer(9683, Realm.deploy(db), xmlrpc.ServerContextFactory()) tums = internet.TCPServer(9682, Realm.deploy(db)) theberpc.setServiceParent(application) flowcollector.setServiceParent(application) tumsSSL.setServiceParent(application) tums.setServiceParent(application) ## TwistD bootstrap code nodaemon = 0 log = '/var/log/tums.log' if len(sys.argv) > 1: if sys.argv[1] == "-n": nodaemon = 1 log = None Utils.startTwisted(application, Settings.BaseDir, nodaemon, log, Settings.BaseDir)