ajout robots

This commit is contained in:
Valentin CZERYBA 2023-02-16 23:06:03 +01:00
parent 8c85e36d85
commit 663b7c4517
3 changed files with 11 additions and 0 deletions

View File

@ -26,6 +26,7 @@ do
cat $log_access | grep "|" | awk -F "|" '{print $1}' | sort | uniq > $directory_host/list_$DATE
cat $log_access | awk -F "|" '{ if($2 == "404") print $1}' > $directory_host/404_$DATE
cat $log_access | awk -F "|" '{ if($2 == "400") print $1}' > $directory_host/400_$DATE
grep robots.txt $log_access | awk -F '|' '{print $3}' > $directory_host/robots_$DATE
while read line; do
if grep $line $DIRECTORY/*/*/output_*.txt > /dev/null 2>&1; then
grep -h -B1 -A8 $line $DIRECTORY/*/*/output_*.txt |head -10 >> $directory_host/output_$DATE.txt
@ -50,6 +51,9 @@ do
cat $directory_host/${j}_$DATE |sort |uniq -c >> ${MAIL}
echo "--------" >> ${MAIL}
done
echo "nombre de robots " >> ${MAIL}
cat $directory_host/robots_$DATE |sort |uniq -c >> ${MAIL}
echo "---------" >> ${MAIL}
cat ${MAIL} |mail -s "Rapport reverse proxy $DATE" -A $directory_host/output_$DATE.txt valczebackup@gmail.com
#rm $directory_host/*
done

View File

@ -23,6 +23,10 @@ do
cat $directory_host/${j}_* |sort |uniq -c >> ${MAIL}
echo "----------------" >> ${MAIL}
done
echo "nombre de robots :" >> ${MAIL}
cat $directory_host/robots_* |sort |uniq -c >> ${MAIL}
echo "----------------" >> ${MAIL}
cat ${MAIL} |mail -s "Rapport mensuel reverse proxy ${i} $DATE" valczebackup@gmail.com
rm -rf $directory_host
done

View File

@ -36,6 +36,9 @@ do
cat $directory_host/${j}_* |sort |uniq -c >> ${MAIL}
echo "----------------" >> ${MAIL}
done
echo "nombre de robots :" >> ${MAIL}
cat $directory_host/robots_* |sort |uniq -c >> ${MAIL}
echo "----------------" >> ${MAIL}
cat ${MAIL} |mail -s "Rapport hebdomadaire reverse proxy ${i} $DATE" valczebackup@gmail.com
#rm $directory_host/*
done