home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff319.lzh
/
CNewsSrc
/
cnews.orig.lzh
/
expire
/
doexpire
< prev
next >
Wrap
Text File
|
1989-06-27
|
1KB
|
60 lines
#! /bin/sh
# doexpire - overall administration for expire
# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/lib/news/bin/config}
PATH=$NEWSCTL/bin:$NEWSBIN/expire:$NEWSBIN:$NEWSPATH ; export PATH
umask $NEWSUMASK
lock="$NEWSCTL/LOCKexpire"
ltemp="$NEWSCTL/L.$$"
echo $$ >$ltemp
trap "rm -f $ltemp ; exit 0" 0 1 2 15
if newslock $ltemp $lock
then
trap "rm -f $ltemp $lock ; exit 0" 0 1 2 15
else
echo "$0: expire apparently already running" | mail "$NEWSMASTER"
exit 1
fi
cd $NEWSCTL
firstctl=
firstar=
while true
do
size="`sizeof history history.pag history.dir`"
if test " `spacefor $size control`" -le 0
then
if test " $firstctl" = " "
then
echo "$0: trouble finding space for work files" |
mail "$NEWSMASTER"
firstctl=n
fi
elif test " `spacefor 1 archive`" -le 0
then
if test " $firstar" = " "
then
echo "$0: trouble finding space for archiving" |
mail "$NEWSMASTER"
firstar=n
fi
else # enough space both places
break
fi
sleep 600 # and hope it will improve
done
expire $* $NEWSCTL/explist 2>/tmp/doex$$
if test -s /tmp/doex$$
then
(echo 'expire problems:' ; cat /tmp/doex$$ ) | mail "$NEWSMASTER"
rm -f /tmp/doex$$
exit 1
fi
rm -f /tmp/doex$$
exit 0