Commit cac70f41 authored by Daniel STAN's avatar Daniel STAN

dhcpd: on restart via monit pour éviter le spam

Sinon, monit n'est pas au courant et signale en permanence
des changements de pid
parent d9c15424
......@@ -16,6 +16,7 @@ if '/usr/scripts' not in sys.path:
from gestion.iptools import AddrInNet
from gestion.gen_confs import gen_config
from gestion.config import NETs
from gestion.config.services import services
from gestion import secrets_new as secrets
# Relative imports
......@@ -83,8 +84,8 @@ class dhcp(gen_config) :
"""
######################################PARTIE DE CONFIGURATION
# Fichier à écire
if hostname in ['dhcp', 'isc']:
restart_cmd = '/etc/init.d/isc-dhcp-server restart'
if hostname in services.get('isc-dhcp-server', []):
restart_cmd = '/usr/bin/monit restart isc-dhcp-server'
reseaux = { '138.231.136.0/21' : '/etc/dhcp3/generated/adherents.liste',
'10.42.0.0/16' : '/etc/dhcp3/generated/gratuit.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é
# Si =1 ralera (chaine warnings) si machines hors zone trouvée
# Si =0 ralera seulement si réseau vide
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment