home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Unix System Administration Handbook 1997 October
/
usah_oct97.iso
/
news
/
cnews.tar
/
expire
/
expireiflow
< prev
next >
Wrap
Text File
|
1994-08-17
|
592b
|
27 lines
#! /bin/sh
# expireiflow minmegabytes [ expireoptions ]
# run doexpire -r if things are getting tight
# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/etc/news/bin/config}
case "$#" in
0) echo "Usage: $0 minmegabytes [ expireoptions ]" >&2
exit 2
;;
esac
minimum=$1
shift
PATH=$NEWSCTL/bin:$NEWSBIN/expire:$NEWSBIN:$NEWSPATH ; export PATH
umask $NEWSUMASK
lock="$NEWSCTL/LOCKexpire"
if test " `spacefor 1024000 articles`" -lt $minimum -a ! -f $lock
then
echo "space getting low in $NEWSARTS; running doexpire -r" |
report "space low in $NEWSARTS"
exec doexpire -r $*
fi