[generate] Ajout du cron dans bcfg2
This commit is contained in:
parent
00bc3a1dd9
commit
f34143dfa9
3 changed files with 26 additions and 0 deletions
3
Bundler/generate.xml
Normal file
3
Bundler/generate.xml
Normal file
|
@ -0,0 +1,3 @@
|
|||
<Bundle name="generate">
|
||||
<Python name="/etc/cron.d/generate"/>
|
||||
</Bundle>
|
|
@ -198,6 +198,7 @@
|
|||
<Group name="pgsql-server"/>
|
||||
<Group name="sqlgrey-localdb"/>
|
||||
<Group name="db-replicat"/>
|
||||
<Bundle name="generate"/>
|
||||
</Group>
|
||||
|
||||
<Group name="titanic"
|
||||
|
@ -617,6 +618,7 @@
|
|||
|
||||
<Group name="isc-dhcp-server">
|
||||
<Bundle name="isc-dhcp-server" />
|
||||
<Bundle name="generate"/>
|
||||
</Group>
|
||||
|
||||
<Group name="nginx">
|
||||
|
@ -709,6 +711,7 @@
|
|||
comment="le serveur DNS primaire de l'association"
|
||||
category="dns">
|
||||
<Group name="dns-server"/>
|
||||
<Bundle name="generate"/>
|
||||
</Group>
|
||||
|
||||
<Group name="dns-secondary"
|
||||
|
@ -843,6 +846,7 @@
|
|||
<!-- C'est aussi le serveur qui fait la delivrance local des mails -->
|
||||
<Group name="mail-mx"/>
|
||||
<Group name="home-permanent"/>
|
||||
<Bundle name="generate"/>
|
||||
</Group>
|
||||
|
||||
<Group name="news-server"
|
||||
|
@ -883,6 +887,7 @@
|
|||
|
||||
<Group name="firewall"
|
||||
comment="Le firewall de l'association">
|
||||
<Bundle name="generate"/>
|
||||
<Bundle name="firewall"/>
|
||||
</Group>
|
||||
|
||||
|
@ -943,6 +948,7 @@
|
|||
<Group name="autostatus"
|
||||
comment="Serveurs qui gènèrent la page d'autostatus">
|
||||
<Bundle name="autostatus"/>
|
||||
<Bundle name="generate"/>
|
||||
</Group>
|
||||
|
||||
<!-- +=================================+ -->
|
||||
|
@ -1030,6 +1036,7 @@
|
|||
<Group name="imap-server">
|
||||
<Group name="imap-backed"/>
|
||||
<Group name="home-permanent"/>
|
||||
<Bundle name="generate"/>
|
||||
<Bundle name="check_cert" />
|
||||
</Group>
|
||||
|
||||
|
@ -1093,6 +1100,7 @@
|
|||
|
||||
<Group name="mailing-list-manager-backend">
|
||||
<Group name="mailman"/>
|
||||
<Bundle name="generate"/>
|
||||
</Group>
|
||||
|
||||
<Group name="antispam-backend">
|
||||
|
|
15
Python/etc/cron.d/generate
Normal file
15
Python/etc/cron.d/generate
Normal file
|
@ -0,0 +1,15 @@
|
|||
# -*- 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 de la configuration des services")
|
||||
|
||||
min=random.randint(0,9)
|
||||
print "%s-%s/10 * * * * root /usr/scripts/gestion/gen_confs/generate.py > /dev/null" % (min, 50+min)
|
Loading…
Add table
Add a link
Reference in a new issue