1 # vim: set et sts=4 sw=4 encoding=utf-8 :
3 # First of all, we need to setup the logging framework
7 format = '%(asctime)s %(name)-24s %(levelname)-8s %(message)s',
8 datefmt = '%a, %d %b %Y %H:%M:%S',
11 from pymin.services import *
12 from pymin.dispatcher import Handler
13 from os.path import join
15 base_path = join('var', 'lib', 'pymin')
16 pickle_path = join(base_path, 'pickle')
17 # FIXME, this should be specific for each service
18 config_path = join(base_path, 'config')
23 f = file("/proc/sys/net/ipv4/ip_forward","w")
26 #self.ip.device_up_hook(self.dns)
28 firewall = FirewallHandler(
29 pickle_dir = join(pickle_path, 'firewall'),
30 config_dir = join(config_path, 'firewall'))
32 nat = NatHandler(pickle_dir = join(pickle_path, 'nat'))
35 pickle_dir = join(pickle_path, 'ppp'),
37 'pap-secrets': join(config_path, 'ppp'),
38 'chap-secrets': join(config_path, 'ppp'),
39 'options.X': join(config_path, 'ppp'),
40 'nameX': join(config_path, 'ppp', 'peers'),
44 pickle_dir = join(pickle_path, 'vpn'),
45 config_dir = join(config_path, 'vpn'))
48 pickle_dir = join(pickle_path, 'ip'),
49 config_dir = join(config_path, 'ip'))
52 pickle_dir = join(pickle_path, 'dns'),
54 'named.conf': join(config_path, 'dns'),
55 'zoneX.zone': join(config_path, 'dns', 'zones'),
59 pickle_dir = join(pickle_path, 'dhcp'),
60 config_dir = join(config_path, 'dhcp'))
63 pickle_dir = join(pickle_path, 'proxy'),
64 config_dir = join(config_path, 'proxy'))
67 pickle_dir = join(pickle_path, 'vrrp'),
68 config_dir = join(config_path, 'vrrp'),
69 pid_dir = join(config_path, 'vrrp', 'run'))
72 pickle_dir = join(pickle_path, 'vpn'),
73 config_dir = join(config_path, 'vpn'))
76 # pickle_dir = join(pickle_path, 'qos'),
77 # config_dir = join(config_path, 'qos'))
81 '', # Bind IP ('' is ANY)