(Solaris 以外なら /etc/rc.local です)
#
# Start INN news service - Internet News Daemon (innd)
#
if [ -f /pub/usr/news/bin/rc.news ]; then
/pub/usr/news/bin/rc.news; echo "Starting INN news service"
fi
また、INN は非常にファイルアクセスの多いプログラムです。 ですから、INN が動作している時に sync は絶対にかけないでください。 sync をかけると多くの情報が紛失してしまいます。 システムを落とすときも必ず INN を終了してからにしてください。
終了の仕方は以下の通りです。
$ /pub/usr/news/bin/ctlinnd shutdown x
あるいは以下のようなスクリプトを書いてシャットダウン時にきちんと 後始末するように /etc/rc0.d/ 内においておくのも有効だと思われます。
#!/bin/sh
PATH=/usr/bin:/usr/ucb:/usr/etc
export PATH
umask 22
cd /
if [ -f /pub/var/news/run/innwatch.pid ] ; then
pid="`cat /pub/var/news/run/innwatch.pid`"
# kill the innwatch shell script
kill $pid
pid="`ps -jae |
sed -e \"/^ *$pid /!d\" -e \"s/^ *$pid *//\" -e \"s/ .*//\"` "
# then kill any child processes of innwatch
if [ $pid ] ; then
kill $pid
fi
fi
if [ "`ls /pub/var/news/lib/innd`" ] ; then
/pub/usr/news/bin/ctlinnd throttle "Preparing to shut down."
/pub/usr/news/bin/ctlinnd readers no "Preparing to shut down."
sleep 5
/pub/usr/news/bin/ctlinnd shutdown "as requested."
fi | sed '/^Ok$/d'