dhcpd: on restart via monit pour éviter le spam
Sinon, monit n'est pas au courant et signale en permanence des changements de pid
This commit is contained in:
parent
d9c1542401
commit
cac70f4193
1 changed files with 3 additions and 13 deletions
|
@ -16,6 +16,7 @@ if '/usr/scripts' not in sys.path:
|
||||||
from gestion.iptools import AddrInNet
|
from gestion.iptools import AddrInNet
|
||||||
from gestion.gen_confs import gen_config
|
from gestion.gen_confs import gen_config
|
||||||
from gestion.config import NETs
|
from gestion.config import NETs
|
||||||
|
from gestion.config.services import services
|
||||||
from gestion import secrets_new as secrets
|
from gestion import secrets_new as secrets
|
||||||
|
|
||||||
# Relative imports
|
# Relative imports
|
||||||
|
@ -83,8 +84,8 @@ class dhcp(gen_config) :
|
||||||
"""
|
"""
|
||||||
######################################PARTIE DE CONFIGURATION
|
######################################PARTIE DE CONFIGURATION
|
||||||
# Fichier à écire
|
# Fichier à écire
|
||||||
if hostname in ['dhcp', 'isc']:
|
if hostname in services.get('isc-dhcp-server', []):
|
||||||
restart_cmd = '/etc/init.d/isc-dhcp-server restart'
|
restart_cmd = '/usr/bin/monit restart isc-dhcp-server'
|
||||||
reseaux = { '138.231.136.0/21' : '/etc/dhcp3/generated/adherents.liste',
|
reseaux = { '138.231.136.0/21' : '/etc/dhcp3/generated/adherents.liste',
|
||||||
'10.42.0.0/16' : '/etc/dhcp3/generated/gratuit.liste',
|
'10.42.0.0/16' : '/etc/dhcp3/generated/gratuit.liste',
|
||||||
'10.2.9.0/24' : '/etc/dhcp3/generated/appartements.liste',
|
'10.2.9.0/24' : '/etc/dhcp3/generated/appartements.liste',
|
||||||
|
@ -102,17 +103,6 @@ class dhcp(gen_config) :
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
host_template_ltsp_powerpc = """
|
|
||||||
host %(nom)s {
|
|
||||||
hardware ethernet %(mac)s;
|
|
||||||
fixed-address %(ip)s;
|
|
||||||
option host-name "%(host)s";
|
|
||||||
next-server 138.231.136.98;
|
|
||||||
filename "yaboot";
|
|
||||||
option root-path "/opt/ltsp/powerpc";
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
|
|
||||||
### Verbosité
|
### Verbosité
|
||||||
# Si =1 ralera (chaine warnings) si machines hors zone trouvée
|
# Si =1 ralera (chaine warnings) si machines hors zone trouvée
|
||||||
# Si =0 ralera seulement si réseau vide
|
# Si =0 ralera seulement si réseau vide
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue