Documentation.
darcs-hash:20050827115650-41617-31720d7dd251ad2b2d24be971d6df7e01be816e6.gz
This commit is contained in:
parent
4ceb411ddf
commit
3d149040f4
1 changed files with 14 additions and 1 deletions
|
@ -1,6 +1,19 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: iso-8859-15 -*-
|
||||||
|
|
||||||
|
# $Id: secours.py,v 1.2 2005-08-27 11:56:50 pauget Exp $
|
||||||
|
|
||||||
|
""" Script de reconfigure des services en connexion de secours
|
||||||
|
Arguments :
|
||||||
|
test : teste la connexion et passe en secours si besoin
|
||||||
|
normal : force la connexion normale
|
||||||
|
secours : force la connexion de secours
|
||||||
|
auto : permet la modification automatique de l'état
|
||||||
|
Sans argument configure les services comme indiqué dans etat_maitre
|
||||||
|
|
||||||
|
Frédéric Pauget août 2005
|
||||||
|
"""
|
||||||
|
|
||||||
import sys, sre, os, commands
|
import sys, sre, os, commands
|
||||||
from socket import gethostname
|
from socket import gethostname
|
||||||
hostname = gethostname().split(".")[0]
|
hostname = gethostname().split(".")[0]
|
||||||
|
@ -8,7 +21,7 @@ path = os.path.dirname(sys.argv[0])
|
||||||
|
|
||||||
### Fichiers à modifier, chaine indiquant un commentaire dans ceux-ci
|
### Fichiers à modifier, chaine indiquant un commentaire dans ceux-ci
|
||||||
### et commandes à excécuter après édition
|
### et commandes à excécuter après édition
|
||||||
if hostname in ('zamok', 'rouge') :
|
if hostname == 'rouge' :
|
||||||
fichiers = { '/etc/bind/named.conf.options' : '//' ,
|
fichiers = { '/etc/bind/named.conf.options' : '//' ,
|
||||||
'/etc/postfix/main.cf' : '#' }
|
'/etc/postfix/main.cf' : '#' }
|
||||||
cmds = [ '/etc/init.d/postfix restart' , '/etc/init.d/bind9 reload' ]
|
cmds = [ '/etc/init.d/postfix restart' , '/etc/init.d/bind9 reload' ]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue