Nouvelle gestion de lock encore plus efficace.
darcs-hash:20050402150536-d1718-3e9c2ba11984c64fc6d9a695132440cae05f295b.gz
This commit is contained in:
parent
8306127fe1
commit
6c703307d7
2 changed files with 11 additions and 13 deletions
|
@ -20,7 +20,7 @@ sys.path.append('/usr/scripts/gestion')
|
|||
from ldap_crans import crans_ldap, crans, smtpserv, hostname
|
||||
from lock import *
|
||||
from affich_tools import anim, cprint, OK, ERREUR, WARNING
|
||||
from time import localtime, strftime, time
|
||||
from time import localtime, strftime, time, sleep
|
||||
import config
|
||||
|
||||
args_autorises = ['quiet', 'remove=', 'add=', 'list' ,'help', 'reconnect']
|
||||
|
@ -325,6 +325,13 @@ if hostname == 'zamok':
|
|||
|
||||
|
||||
elif hostname == 'nectaris':
|
||||
restart_wifi_update = False
|
||||
if 'conf_wifi' in to_do.keys() or 'bornes_wifi' in to_do.keys():
|
||||
# On arrete wifi-update
|
||||
os.system("kill $(cat /var/run/wifi-update.pid)")
|
||||
sleep(1)
|
||||
restart_wifi_update = True
|
||||
|
||||
# On s'occupe de nectaris
|
||||
if 'conf_wifi' in to_do.keys():
|
||||
if auto : db.services_to_restart('-conf_wifi')
|
||||
|
@ -369,6 +376,9 @@ elif hostname == 'nectaris':
|
|||
if auto : db.services_to_restart('droits-nectaris')
|
||||
sys.stdout.write('Erreur dans la config des droits sur nectaris.\n')
|
||||
|
||||
if restart_wifi_update:
|
||||
os.system("cd / ; systrace -d /etc/systrace/wifi-update -A /usr/local/bin/twistd --syslog -o -y /usr/scripts/gestion/wifi-update.py --pidfile=/var/run/wifi-update.pid")
|
||||
|
||||
elif hostname == 'sila' :
|
||||
if 'bl_carte_etudiant' in to_do.keys() :
|
||||
if auto : db.services_to_restart('-bl_carte_etudiant')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue