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.dispatcher import Handler
12 from os.path import join
14 base_path = join('var', 'lib', 'pymin')
15 pickle_path = join(base_path, 'pickle')
16 # FIXME, this should be specific for each service
17 config_path = join(base_path, 'config')
20 f = file("/proc/sys/net/ipv4/ip_forward","w")
23 except (IOError, OSError), e:
24 print "Can't set ip_forward:", e
27 pickle_dir = join(pickle_path, 'firewall')
28 config_dir = join(config_path, 'firewall')
31 pickle_dir = join(pickle_path, 'nat')
34 pickle_dir = join(pickle_path, 'ppp')
36 'pap-secrets': join(config_path, 'ppp'),
37 'chap-secrets': join(config_path, 'ppp'),
38 'options.X': join(config_path, 'ppp'),
39 'nameX': join(config_path, 'ppp', 'peers'),
43 pickle_dir = join(pickle_path, 'vpn')
44 config_dir = join(config_path, 'vpn')
47 pickle_dir = join(pickle_path, 'ip')
48 config_dir = join(config_path, 'ip')
51 pickle_dir = join(pickle_path, 'dns')
53 'named.conf': join(config_path, 'dns'),
54 'zoneX.zone': join(config_path, 'dns', 'zones'),
58 pickle_dir = join(pickle_path, 'dhcp')
59 config_dir = join(config_path, 'dhcp')
62 pickle_dir = join(pickle_path, 'proxy')
63 config_dir = join(config_path, 'proxy')
66 pickle_dir = join(pickle_path, 'vrrp')
67 config_dir = join(config_path, 'vrrp')
68 pid_dir = join(config_path, 'vrrp', 'run')
71 pickle_dir = join(pickle_path, 'vpn')
72 config_dir = join(config_path, 'vpn')
75 pickle_dir = join(pickle_path, 'qos')
76 config_dir = join(config_path, 'qos')
80 '', # Bind IP ('' is ANY)
84 services = 'firewall nat ppp vpn ip dns dhcp proxy vrrp qos'.split()
86 services_dirs = ['pymin/services']