X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/3a113e91bcbc8e34d9ef66915ccec80e6187332b..a5e2677e65427f1bc577a1deba121060972801d6:/services/proxy/__init__.py diff --git a/services/proxy/__init__.py b/services/proxy/__init__.py index ab2e84c..33e18d6 100644 --- a/services/proxy/__init__.py +++ b/services/proxy/__init__.py @@ -1,7 +1,17 @@ # vim: set encoding=utf-8 et sw=4 sts=4 : +from formencode import validators as V +from pymin.config import Option from handler import ProxyHandler +def setup_service(options, config): + options.add_group('proxy', 'Proxy service', [ + Option('pickle_dir', V.String, metavar='DIR', + help='store persistent data in DIR directory'), + Option('config_dir', V.String, metavar='DIR', + help='write config files in DIR directory'), + ]) + def get_service(config): return ProxyHandler(config.proxy.pickle_dir, config.proxy.config_dir)