Projet

Général

Profil

cron-zephir.sh

Proposition de script corrigé - Joël Cuissinat, 02/04/2012 14:43

Télécharger (948 octets)

 
1
#!/bin/bash
2
###########################################################################
3
# Eole NG - 2007
4
# Copyright Pole de Competence Eole  (Ministere Education - Academie Dijon)
5
# Licence CeCill  cf /root/LicenceEole.txt
6
# eole@ac-dijon.fr
7
#
8
# cronzephir.sh
9
#
10
# script relançant le service z_stats si il est arreté
11
#
12
###########################################################################
13

    
14
# ne pas relancer z_stats avant la première installation
15
[ ! -f /etc/eole/config.eol ] && exit 0
16

    
17
/usr/bin/enregistrement_zephir --check >/dev/null
18
if [ $? -eq 0 ]
19
then
20
	# le serveur est enregistré, on vérifie que le service de statistiques fonctionne
21
	/etc/init.d/z_stats status &> /dev/null
22
	if [ $? != 0 ]
23
	then
24
	    . /usr/share/eole/FonctionsEoleNg
25
        # pas de redémarrage au milieu du reconfigure
26
        CheckAllLocks
27
	    /etc/init.d/z_stats restart
28
	    Zephir "MSG" "Service z_stats arreté : redémarrage" "ZEPHIR"
29
	fi
30
fi
31
exit 0