X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/3a113e91bcbc8e34d9ef66915ccec80e6187332b..b53a45e7e79b31d0b6b44df0405366cc8a2fd016:/services/firewall/__init__.py?ds=inline diff --git a/services/firewall/__init__.py b/services/firewall/__init__.py index 2c8e091..6c1cbe3 100644 --- a/services/firewall/__init__.py +++ b/services/firewall/__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 FirewallHandler +def setup_service(options, config): + options.add_group('firewall', 'Firewall 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 file in DIR directory'), + ]) + def get_service(config): return FirewallHandler(config.firewall.pickle_dir, config.firewall.config_dir)