From f023c5b0f52bf39ea3fc6bb1f0538cc998798cd9 Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Sat, 27 Sep 2014 22:22:54 +0200 Subject: [PATCH] =?UTF-8?q?secours:=20m=C3=A0j=20(plus=20de=20komaz,=20ni?= =?UTF-8?q?=20gordon)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- secours/secours.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/secours/secours.py b/secours/secours.py index a4c56f8d..b03145b0 100755 --- a/secours/secours.py +++ b/secours/secours.py @@ -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)