This commit is contained in:
Michael RICOIS 2014-04-18 07:51:13 +00:00
parent 8f6adbf77b
commit a37ff8277e
3 changed files with 0 additions and 57 deletions

View File

@ -1,7 +0,0 @@
#!/bin/bash
PATH_BIN=/usr/local/sphinx/bin
PATH_LOG=/dbs/sphinxlog
echo "DEBUT de l'indexation ==== $(date +%H:%M:%S)" >> $PATH_LOG/indexerAct-$(date +%F).log
$PATH_BIN/indexer --rotate act act_phx >> $PATH_LOG/indexerAct-$(date +%F).log
echo "FIN ===== $(date +%H:%M:%S)" >> $PATH_LOG/indexerAct-$(date +%F).log

View File

@ -1,8 +0,0 @@
#!/bin/bash
PATH_BIN=/usr/local/sphinx/bin
PATH_LOG=/dbs/sphinxlog
echo "DEBUT de l'indexation ==== $(date +%H:%M:%S)" >> $PATH_LOG/indexerDiri-$(date +%F).log
$PATH_BIN/indexer --rotate dir dir_phx >> $PATH_LOG/indexerDiri-$(date +%F).log
echo "Sphinx - termine : $(date +%H:%M:%S)" >> $PATH_LOG/indexerDiri-$(date +%F).log
echo "FIN ===== $(date +%H:%M:%S)" >> $PATH_LOG/indexerDiri-$(date +%F).log

View File

@ -1,42 +0,0 @@
#!/bin/bash
PATH_BIN=/usr/local/sphinx/bin
PATH_LOG=/dbs/sphinxlog
DATE=`date '+%Y-%m-%d %H-%M-%S'`
echo "DEBUT de l'indexation ==== $(date +%H:%M:%S)" >> $PATH_LOG/indexerEtab-$(date +%F).log
# nombre de lignes dans la table etab
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < sql/countEtab.sql)
for line in "$output"; do
etab="$line"
done
# Suppression fin de ligne
etab=$(echo $etab|sed -e "s/^[etab ]*//g"||sed -e "s/[ ]*$//g")
# Cast de la variable au cas ou
#etab=$(echo $etab| gawk '{print + 0}')
# nombre de lignes dans la table etab_tmp
output=$(mysql -h192.168.3.30 -usphinx -pindexer jo < sql/countEtab_tmp.sql)
for line in "$output"; do
etab_tmp="$line"
done
# Suppression fin de ligne
etab_tmp=$(echo $etab_tmp|sed -e "s/^[etab_tmp ]*//g"||sed -e "s/[ ]*$//g")
# Cast de la variable au cas ou
#etab_tmp=$(echo $etab_tmp| gawk '{print + 0}')
# Comparaison du nombre de lignes entre etab (ancien) et etab_tmp (nouveau)
if test $etab_tmp -gt $etab; then
echo "Il y a $etab_tmp lignes dans la nouvelle table etablissement ($etab lignes dans l'ancienne)" >> $PATH_LOG/indexerEtab-$(date +%F).log
# $PATH_BIN/indexer --rotate --all >> $PATH_LOG/indexer-$(date +%F).log
$PATH_BIN/indexer --rotate ent ent_mns ent_phx >> $PATH_LOG/indexerEtab-$(date +%F).log
echo "Sphinx - terminé : $(date +%H:%M:%S)" >> $PATH_LOG/indexerEtab-$(date +%F).log
mysql -f -usphinx -h192.168.3.30 -pindexer jo < sql/finIndexationEtab.sql >> $PATH_LOG/indexerEtab-$(date +%F).log
else
# Il y a plus de lignes dans l'ancienne table etablissements ==> On ne fait rien
echo "Il n'y a pas assez de lignes dans la nouvelle table etablissement ($etab_tmp / $etab) !" >> $PATH_LOG/indexerEtab-$(date +%F).log
exit
fi
echo "FIN ===== $(date +%H:%M:%S)" >> $PATH_LOG/indexerEtab-$(date +%F).log