n/oldblog
Archived
1
0
Fork 0
This repository has been archived on 2024-02-13. You can view files and clone it, but cannot push or open issues or pull requests.
oldblog/scripts/dazibaweb/makecache

24 lines
828 B
Text
Raw Normal View History

2023-04-30 21:28:42 +02:00
#!/bin/sh
root='/home/www/website';
for i in reuters presse yahooactu yahoosport bsd apple linux info php securite pda cinema musique googlenews.fr videos
do
echo -e "\nMise en cache $i";
for j in 1 2 3 4 5 6 7 8 9 10
{
echo "$j ";
export nbnews=$j;
echo "MAJ `date +%d/%m/%Y`@`date +%H:%M`" > $root/modules/backends/$i.date.txt
echo -e "\n<!-- Partie mise en cache (`date +%d/%m/%Y`@`date +%H:%M:%S`)-->\n"> $root/tmp/pages/news/$i.$j.cache.php
#php -q $root/pages/news/$i.php $j >> $root/tmp/pages/news/$i.$j.cache.php
/usr/local/bin/lynx --source "http://old.tourmentine.com/pages/news/$i.php?nbnews=$j" >> $root/tmp/pages/news/$i.$j.cache.php
sleep 1
echo -e "\n\n<!-- fin Partie mise en cache -->\n" >> $root/tmp/pages/news/$i.$j.cache.php
}
done
export nbnews="";
echo -e "\nMise en cache termin<69>e\n\n";