66 lines
1.4 KiB
Plaintext
66 lines
1.4 KiB
Plaintext
|
#!/bin/bash
|
||
|
###########################################################################
|
||
|
# Eole NG - 2007
|
||
|
# Copyright Pole de Competence Eole (Ministere Education - Academie Dijon)
|
||
|
# Licence CeCill cf /root/LicenceEole.txt
|
||
|
# eole@ac-dijon.fr
|
||
|
#
|
||
|
# diagnose
|
||
|
#
|
||
|
# Verifie l'instanciation d'un serveur
|
||
|
#
|
||
|
###########################################################################
|
||
|
. /usr/lib/eole/ihm.sh
|
||
|
. /usr/lib/eole/utils.sh
|
||
|
|
||
|
only_root
|
||
|
|
||
|
CREOLE_FILE="/etc/eole/config.eol"
|
||
|
RELEASE_FILE="/etc/eole/release"
|
||
|
DIAG_DIR="/usr/share/eole/diagnose"
|
||
|
err_prefix="Diagnose impossible"
|
||
|
|
||
|
TestFile $CREOLE_FILE
|
||
|
if [ ${?} -eq 1 ]
|
||
|
then
|
||
|
EchoRouge "${err_prefix} : le serveur n'est pas instancié"
|
||
|
exit 1
|
||
|
fi
|
||
|
TestFile $RELEASE_FILE
|
||
|
if [ ${?} -eq 1 ]
|
||
|
then
|
||
|
EchoRouge "${err_prefix} : le serveur n'est pas instancié"
|
||
|
exit
|
||
|
fi
|
||
|
TestDir $DIAG_DIR
|
||
|
if [ ${?} -eq 1 ]
|
||
|
then
|
||
|
EchoRouge "${err_prefix} : pas script diagnose disponible"
|
||
|
exit 1
|
||
|
fi
|
||
|
TestCreoled
|
||
|
if [ ${?} -eq 1 ]
|
||
|
then
|
||
|
EchoRouge "${err_prefix} : creoled est arrêté"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
Opt=""
|
||
|
while getopts "LWT" Option
|
||
|
do
|
||
|
case $Option in
|
||
|
L ) export Verbose="yes";;
|
||
|
W ) export ModeEad="yes";;
|
||
|
T ) export ModeTxt="yes";;
|
||
|
* ) exit 1;;
|
||
|
esac
|
||
|
done
|
||
|
|
||
|
. $RELEASE_FILE
|
||
|
DETAILS="$(CreoleGet nom_machine) $(CreoleGet numero_etab)"
|
||
|
[ -z "$EOLE_RELEASE" ] && EOLE_RELEASE=$EOLE_VERSION
|
||
|
EchoGras "*** Test du module $EOLE_MODULE version $EOLE_RELEASE ($DETAILS) ***"
|
||
|
echo
|
||
|
run-parts $DIAG_DIR
|
||
|
EchoGras "*** FIN DU DIAGNOSTIC ***"
|