2 # vim: set encoding=utf-8 et sw=4 sts=4 :
5 from pymin.pymindaemon import PyminDaemon
6 from pymin.dispatcher import Handler
7 from pymin.service import load_service, LoadError
16 def build_root(config):
17 # TODO check services dependencies
19 for service in config.services:
21 s = load_service(service, config.services_dirs)
23 sys.stderr.write("Can't find service called '%s'\n" % service)
24 sys.exit(EXIT_NO_SERVICE)
27 for name, service in services.items():
28 setattr(root, name, service.get_service(config))
31 PyminDaemon(build_root(config), config.bind_addr).run()