Modifications dans les commandes pour reconstruire l'historique,

lancement de news.daily aprs la reconstruction.
(stransky)

darcs-hash:20021123180745-a279a-ef1f376aea0a3c4e68b61e64ee2ea33b83bdef05.gz
This commit is contained in:
stransky 2002-11-23 19:07:45 +01:00
parent 5f74981119
commit 2f6836cda6

View file

@ -5,11 +5,11 @@ if [ $UID != 0 ]; then
exit 1 exit 1
fi fi
# /etc/init.d/inn2 stop /etc/init.d/inn2 stop
(awk -F: -f - /etc/news/buffindexed.conf <<EOF"" (awk -F: -f - /etc/news/buffindexed.conf <<EOF""
($0 !~ /^#/ && NF == 3) { ($0 !~ /^#/ && NF == 3) {
print "su news -c \"dd if=/dev/zero of="$2" bs=1k count="$3"\"" print "su news -c \"dd if=/dev/zero of="$2" bs=1024 count="$3"\""
} }
EOF EOF
) | sh ) | sh
@ -22,16 +22,23 @@ fi
cd /var/lib/news cd /var/lib/news
(awk -F£ '{ printf "su news -c \"" ; if ($1 == 1) printf "/usr/lib/news/bin/" ; printf $2"\" ; if [ $? != 0 ]; then echo \"Erreur pour la commande "NR"\" ; exit 2 ; fi\n"}' <<EOF"" (awk -F£ '{ printf "su news -c \"" ; if ($1 == 1) printf "/usr/lib/news/bin/" ; printf $2"\" ; if [ $? != 0 ]; then echo \"Erreur pour la commande "NR"\" ; exit 2 ; fi\n"}' <<EOF""
1£makehistory -b -f history.n -O -l 30000 -I 0£rm -f history*
0£awk 'NF == 2 { print }' < history >> history.n 0£touch history
1£makedbz -s $(wc -l < history) -f history.n 1£makedbz -i
0£mv -f history.n history
0£mv -f history.n.dir history.dir 0£mv -f history.n.dir history.dir
0£mv -f history.n.hash history.hash 0£mv -f history.n.hash history.hash
0£mv -f history.n.index history.index 0£mv -f history.n.index history.index
0£chmod 664 history*
1£makehistory -a -O -b -e
EOF EOF
) | sh ) | sh
echo "OK, redemarrage de INN" echo "OK, redemarrage de INN"
/etc/init.d/inn2 start
(awk -F£ '{ printf "su news -c \"" ; if ($1 == 1) printf "/usr/lib/news/bin/" ; printf $2"\" ; if [ $? != 0 ]; then echo \"Erreur pour la commande "NR"\" ; exit 2 ; fi\n"}' <<EOF""
1£news.daily delayrm noexpireover lowmark nostat nomail
1£news.daily delayrm expireover lowmark nostat nomail
EOF
) | sh
# /etc/init.d/inn2 start