[firewall] init script et cron dans bcfg2
This commit is contained in:
parent
5d7c2cc7f8
commit
476d16e029
4 changed files with 27 additions and 10 deletions
16
Python/etc/cron.d/firewall
Normal file
16
Python/etc/cron.d/firewall
Normal file
|
@ -0,0 +1,16 @@
|
|||
# -*- coding: utf-8; mode: python -*-
|
||||
|
||||
info["owner"] = "root"
|
||||
info["group"] = "root"
|
||||
info["perms"] = 0644
|
||||
|
||||
include("ip")
|
||||
|
||||
import random
|
||||
random.seed(admip())
|
||||
|
||||
header("Régénération du pare-feu")
|
||||
|
||||
min=random.randint(0,59)
|
||||
print "# Regénération des règles MAC-IP du firewall"
|
||||
print "%s 1 * * * root /usr/scripts/gestion/gen_confs/firewall4.py test_mac_ip > /dev/null" % min
|
|
@ -109,9 +109,10 @@ service("cron",
|
|||
|
||||
service("dhcp-detect")
|
||||
|
||||
if has("firewall"):
|
||||
if has("komaz"):
|
||||
service(None,
|
||||
name="filtrage_firewall")
|
||||
if has("comptage-upload"):
|
||||
service(None,
|
||||
name="netacct-crans-ens",
|
||||
pidf="netacct-crans-ens",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue