Nouvelle place
darcs-hash:20051019153736-41617-45b4633b34a628a50f43d9723e706c016fa338da.gz
This commit is contained in:
parent
7c92f6c2b9
commit
90804f0537
3 changed files with 248 additions and 0 deletions
48
news/fix-overview
Executable file
48
news/fix-overview
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $UID != 0 ]; then
|
||||
echo "Il faut être root pour lancer ce script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/etc/init.d/inn2 stop
|
||||
|
||||
(awk -F: -f - /etc/news/buffindexed.conf <<EOF""
|
||||
($0 !~ /^#/ && NF == 3) {
|
||||
print "su news -c \"dd if=/dev/zero of="$2" bs=1024 count="$3"\""
|
||||
}
|
||||
EOF
|
||||
) | sh
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
echo "Impossible d'écraser l'overview"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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""
|
||||
0£rm -f history*
|
||||
0£touch history
|
||||
1£makedbz -i
|
||||
0£mv -f history.n.dir history.dir
|
||||
0£mv -f history.n.hash history.hash
|
||||
0£mv -f history.n.index history.index
|
||||
0£chmod 664 history*
|
||||
1£makehistory -a -O -b -e
|
||||
EOF
|
||||
) | sh
|
||||
|
||||
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
|
||||
|
||||
echo -------------------------------------------------
|
||||
echo Stats d'utilisation des fichiers d'overview :
|
||||
su news -c "/usr/lib/news/bin/inndf -o"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue