]> git.llucax.com Git - software/pymin.git/blob - config.py
Add a timer handler to ppp to monitor ppp connections state.
[software/pymin.git] / config.py
1 # vim: set et sts=4 sw=4 encoding=utf-8 :
2
3 from pymin.services import *
4 from pymin.dispatcher import Handler
5 from os.path import join
6
7 base_path = join('var', 'lib', 'pymin')
8 pickle_path = join(base_path, 'pickle')
9 # FIXME, this should be specific for each service
10 config_path = join(base_path, 'config')
11
12 class Root(Handler):
13     ip = IpHandler(
14         pickle_dir = join(pickle_path, 'ip'),
15         config_dir = join(config_path, 'ip'))
16     firewall = FirewallHandler(
17         pickle_dir = join(pickle_path, 'firewall'),
18         config_dir = join(config_path, 'firewall'))
19     nat = NatHandler(pickle_dir = join(pickle_path, 'nat'))
20     dns = DnsHandler(
21         pickle_dir = join(pickle_path, 'dns'),
22         config_dir = {
23             'named.conf': join(config_path, 'dns'),
24             'zoneX.zone': join(config_path, 'dns', 'zones'),
25         })
26     dhcp = DhcpHandler(
27         pickle_dir = join(pickle_path, 'dhcp'),
28         config_dir = join(config_path, 'dhcp'))
29     ppp = PppHandler(
30         pickle_dir = join(pickle_path, 'ppp'),
31         config_dir = join(config_path, 'ppp'))
32     vrrp = VrrpHandler(
33         pickle_dir = join(pickle_path, 'vrrp'),
34         config_dir = join(config_path, 'vrrp'))
35     proxy = ProxyHandler(
36         pickle_dir = join(pickle_path, 'proxy'),
37         config_dir = join(config_path, 'proxy'))
38
39 bind_addr = \
40 (
41     '',   # Bind IP ('' is ANY)
42     9999, # Port
43 )
44