X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/3a113e91bcbc8e34d9ef66915ccec80e6187332b..8c3c99945f0124871769997e7335546b52b0af61:/services/vrrp/__init__.py diff --git a/services/vrrp/__init__.py b/services/vrrp/__init__.py index 15cf061..0d71b88 100644 --- a/services/vrrp/__init__.py +++ b/services/vrrp/__init__.py @@ -1,7 +1,20 @@ # vim: set encoding=utf-8 et sw=4 sts=4 : +from formencode import validators as V +from pymin.config import Option from handler import VrrpHandler +def setup_service(options, config): + options.add_group('vrrp', 'Virtual Router Redundancy 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'), + Option('pid_dir', V.String, metavar='DIR', + help='write PID file in DIR directory'), + ]) + def get_service(config): - return VrrpHandler(config.vrrp.pickle_dir, config.vrrp.config_dir) + return VrrpHandler(config.vrrp.pickle_dir, config.vrrp.config_dir, + config.vrrp.pid_dir)