secours: màj (plus de komaz, ni gordon)
This commit is contained in:
parent
390d500235
commit
f023c5b0f5
1 changed files with 5 additions and 12 deletions
|
@ -41,16 +41,13 @@ FICHIERS = {
|
|||
'charybde': {
|
||||
'/etc/bind/named.conf.options': '//' ,
|
||||
},
|
||||
'gordon': {
|
||||
'/etc/bind/named.conf.options': '//' ,
|
||||
},
|
||||
'nem': {
|
||||
'/etc/bind/named.conf.options': '//' ,
|
||||
},
|
||||
'zamok': {
|
||||
'/etc/postfix/main.cf': '#',
|
||||
},
|
||||
'komaz': {
|
||||
'odlyd': {
|
||||
'/proc/net/nf_condition/secours': '0',
|
||||
}
|
||||
}.get(HOSTNAME, {})
|
||||
|
@ -66,18 +63,14 @@ COMMANDES = {
|
|||
'charybde': [
|
||||
'/etc/init.d/bind9 reload',
|
||||
],
|
||||
'gordon': [
|
||||
'/etc/init.d/bind9 reload',
|
||||
],
|
||||
'nem': [
|
||||
'/etc/init.d/bind9 reload',
|
||||
],
|
||||
'zamok': [
|
||||
'/etc/init.d/postfix restart',
|
||||
],
|
||||
'komaz': [
|
||||
'/etc/init.d/aiccu restart',
|
||||
'/usr/bin/monit monitor netacct-crans-sixxs2',
|
||||
'odlyd': [
|
||||
'/etc/init.d/aiccu restart',
|
||||
],
|
||||
}.get(HOSTNAME, [])
|
||||
|
||||
|
@ -148,7 +141,7 @@ def rewrite_config(fichier, comment, etat):
|
|||
lignes terminant par "#POUR SECOURS", ou les n lignes suivant une
|
||||
ligne commençant par "#POUR SECOURS-n" (si le -n est omis, une
|
||||
seule ligne est affectée)"""
|
||||
if HOSTNAME=='komaz':
|
||||
if HOSTNAME=='odlyd':
|
||||
if etat=='secours':
|
||||
clobber(fichier,'1')
|
||||
elif etat=='normal':
|
||||
|
@ -280,7 +273,7 @@ def main():
|
|||
print "Mode %s" % mode_m_apres
|
||||
|
||||
|
||||
if HOSTNAME == 'komaz':
|
||||
if HOSTNAME == 'odlyd':
|
||||
fichier, commentaire = FICHIERS.items()[0]
|
||||
try:
|
||||
rewrite_config(fichier, commentaire, etat_h_apres)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue