From 41b415961bc358e7704b47c81af9f56f54c8d568 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 25 Nov 2011 16:21:43 +0000 Subject: [PATCH] script d'indexation --- indexer/indexerAct.sh | 9 +++++++++ indexer/{sh => }/indexerDiri.sh | 2 +- indexer/{sh => }/indexerEtab.sh | 2 +- indexer/sql/countDiri.sql | Bin 1533 -> 44 bytes 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 indexer/indexerAct.sh rename indexer/{sh => }/indexerDiri.sh (92%) rename indexer/{sh => }/indexerEtab.sh (93%) diff --git a/indexer/indexerAct.sh b/indexer/indexerAct.sh new file mode 100644 index 0000000..4e88909 --- /dev/null +++ b/indexer/indexerAct.sh @@ -0,0 +1,9 @@ +#!/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/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 diff --git a/indexer/sh/indexerDiri.sh b/indexer/indexerDiri.sh similarity index 92% rename from indexer/sh/indexerDiri.sh rename to indexer/indexerDiri.sh index 5564529..c4511d9 100755 --- a/indexer/sh/indexerDiri.sh +++ b/indexer/indexerDiri.sh @@ -27,7 +27,7 @@ if test $etab_tmp -gt $etab; then echo "Il y a $etab_tmp lignes dans la nouvelle table dirigeants ($etab lignes dans l'ancienne)" >> $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 - mysql -f -uroot -h192.168.3.30 -pscores jo < finIndexationDiri.sql >> $PATH_LOG/indexerDiri-$(date +%F).log + mysql -f -usphinx -h192.168.3.30 -pindexer jo < sql/finIndexationDiri.sql >> $PATH_LOG/indexerDiri-$(date +%F).log else # Il y a plus de lignes dans l'ancienne table dirigeants ==> On ne fait rien echo "Il n'y a pas assez de lignes dans la nouvelle table dirigeants ($etab_tmp / $etab) !" >> $PATH_LOG/indexerDiri-$(date +%F).log diff --git a/indexer/sh/indexerEtab.sh b/indexer/indexerEtab.sh similarity index 93% rename from indexer/sh/indexerEtab.sh rename to indexer/indexerEtab.sh index 0bf8be5..5ef9e32 100755 --- a/indexer/sh/indexerEtab.sh +++ b/indexer/indexerEtab.sh @@ -32,7 +32,7 @@ if test $etab_tmp -gt $etab; then # $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 -uroot -h192.168.3.30 -pscores jo < finIndexationEtab.sql >> $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 diff --git a/indexer/sql/countDiri.sql b/indexer/sql/countDiri.sql index bc24bbe0228a8b98ce58eff726ee621dc3503976..609a33a24c4bec461996bcd81a9ab1ef0474dc40 100644 GIT binary patch literal 44 zcmWG`^>K9$QAo}&%`4H+(o}E^R!A*LOo}hbEl@}+%Fk6u$t=oDPfg4#DYgaxJgyG@ literal 1533 zcmV2K|NlSd{%imL|Na0V2~5BM0ssIA zUQ zRe)ju&;%$qwNR*5g%OVlm_0stNJQ8XgnRGQ^R@AeUm(LEWo;NcLi##ftwWG(9IeBt zy${RL1Q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