diff --git a/gestion/gen_confs/dhcpd.py b/gestion/gen_confs/dhcpd.py index a7a365b1..3b267288 100755 --- a/gestion/gen_confs/dhcpd.py +++ b/gestion/gen_confs/dhcpd.py @@ -72,7 +72,7 @@ subnet %(network)s netmask %(netmask)s { # Si =0 ralera seulement si réseau vide verbose = 1 - restart_cmd = '/etc/init.d/dhcp stop ; sleep 1 ; /etc/init.d/dhcp start' + restart_cmd = '/etc/init.d/dhcp restart' ######################################FIN PARTIE DE CONFIGURATION diff --git a/gestion/gen_confs/switchs.py b/gestion/gen_confs/switchs.py index 7453010b..64fcc926 100755 --- a/gestion/gen_confs/switchs.py +++ b/gestion/gen_confs/switchs.py @@ -78,8 +78,11 @@ class switch(gen_config) : conn=smtplib.SMTP('localhost') txt_mail = "From: Crans scripts <%(From)s>\n" txt_mail+= "To: %(To)s\n" - txt_mail+= "Subject: Bienvenue au Cr@ns !\n\n" - txt_mail+= "Chambre %s à débrancher." % chbre + txt_mail+= "Subject: (CRANS) Changement d'état d'une chambre !\n\n" + if action == 'disable': + txt_mail+= "Chambre %s à débrancher." % chbre + else: + txt_mail+= "Chambre %s à brancher." % chbre conn.sendmail(From, To , txt_mail % { 'From' : From, 'To' : To }) conn.quit() print OK