Encore des conneries
darcs-hash:20040905213504-d1718-f80e46f82a6dcaefee398f2188b137995e109ad3.gz
This commit is contained in:
parent
21ddceafe7
commit
a9c7f1b23f
2 changed files with 6 additions and 3 deletions
|
@ -72,7 +72,7 @@ subnet %(network)s netmask %(netmask)s {
|
||||||
# Si =0 ralera seulement si réseau vide
|
# Si =0 ralera seulement si réseau vide
|
||||||
verbose = 1
|
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
|
######################################FIN PARTIE DE CONFIGURATION
|
||||||
|
|
||||||
|
|
|
@ -78,8 +78,11 @@ class switch(gen_config) :
|
||||||
conn=smtplib.SMTP('localhost')
|
conn=smtplib.SMTP('localhost')
|
||||||
txt_mail = "From: Crans scripts <%(From)s>\n"
|
txt_mail = "From: Crans scripts <%(From)s>\n"
|
||||||
txt_mail+= "To: %(To)s\n"
|
txt_mail+= "To: %(To)s\n"
|
||||||
txt_mail+= "Subject: Bienvenue au Cr@ns !\n\n"
|
txt_mail+= "Subject: (CRANS) Changement d'état d'une chambre !\n\n"
|
||||||
txt_mail+= "Chambre %s à débrancher." % chbre
|
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.sendmail(From, To , txt_mail % { 'From' : From, 'To' : To })
|
||||||
conn.quit()
|
conn.quit()
|
||||||
print OK
|
print OK
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue