/etc/news/boot is in inn 1:1.7.2q-41build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | #! /bin/sh
## $Revision: 1.22 $
## News boot script. Runs as "news" user. Requires inndstart be
## setuid root. Run from rc.whatever as:
## su news -c /path/to/rc.news >/dev/console
## =()<. @<_PATH_SHELLVARS>@>()=
. /usr/lib/news/innshellvars
## Pick ${INND} or ${INNDSTART}
WHAT=${INNDSTART}
## Set to true or false
DOINNWATCH=false
DOACTIVED=false
MAIL="${MAILCMD} -s 'Boot-time Usenet warning on `hostname`' ${NEWSMASTER}"
## RFLAG is set below; set FLAGS as appropriate.
RFLAG=""
FLAGS="-i0"
## Clean shutdown?
if [ -f ${SERVERPID} ] ; then
echo 'INND: PID file exists -- unclean shutdown!'
RFLAG="-r"
fi
if [ ! -f ${NEWSLIB}/.news.daily ] ; then
echo 'No .news.daily file; need to run news.daily?' | eval ${MAIL}
else
case `find ${NEWSLIB}/.news.daily -mtime +1 -print 2>/dev/null` in
"")
;;
*)
echo 'Old .news.daily file; need to run news.daily?' | eval ${MAIL}
;;
esac
fi
## Active file recovery.
if [ ! -s ${ACTIVE} ] ; then
if [ -s ${NEWACTIVE} ] ; then
mv ${NEWACTIVE} ${ACTIVE}
else
if [ -s ${OLDACTIVE} ] ; then
cp ${OLDACTIVE} ${ACTIVE}
else
echo 'INND: No active file!'
exit 1
fi
fi
RFLAG="-r"
# You might want to rebuild the DBZ database, too:
#cd ${NEWSLIB} \
# && makehistory -r \
# && mv history.n.dir history.dir \
# && mv history.n.pag history.pag
fi
## Remove temporary batchfiles and lock files.
( cd ${BATCH} && rm -f bch* )
( cd ${LOCKS} && rm -f LOCK* )
( cd ${TEMPSOCKDIR} && rm -f ${TEMPSOCK} )
rm -f ${NEWSCONTROL} ${NNTPCONNECT} ${SERVERPID}
## Start the show.
echo -n 'Starting news server:'
eval ${WHAT} ${RFLAG} ${FLAGS}
echo -n ' innd'
${DOACTIVED} && {
echo -n ' actived'
${NEWSBIN}/actived > $ERRLOG 2>&1
}
# Gee, looks like lisp, doesn't it?
${DOINNWATCH} && {
echo -n ' innwatch'
( sleep 60 ; exec ${INNWATCH} > $ERRLOG 2>&1 ) &
}
echo '.'
RMFILE=${MOST_LOGS}/expire.rm
for F in ${RMFILE} ${RMFILE}.*; do
if [ -f $F -a -s $F ] ; then
echo "INND: Removing articles from pre-downtime expire run (${F})."
(
echo 'System shut down during expire.' \
'Unlinking articles listed in'
echo ${F}
) | eval ${MAIL}
${NEWSBIN}/expirerm ${F}
fi
done &
|