🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #16329

Re: innd 1.5.1 - multiple innwatches?

#16329
From: Mark A. Stevens
Date: Wed, 26 Mar 1997 00:00
106 lines
4699 bytes
In article <242ade59.u9t27e.f0139@slip106.termserv.siu.edu>,
Jim Dutton <jimd@slip106.termserv.siu.edu> wrote:
>Hi Gary, on Mar 24 you wrote:
>
>> Yes.  thanks.  Still not sure how all those innwatch'es were left
>> hanging around.  Perhsaps some config error that got fixed along
>> the way ....
>
>Multiple instantiations of INNWATCH usually imply that INND has died or been
>shutdown. Since nothing stops INNWATCH in these situations, it keeps on
>running. Then when INND is restarted, a NEW INNWATCH task is started (assuming
>of course, that DOINNWATCH=TRUE).
>
>At this point, NObody checks to see if there WAS an INNWATCH already running,
>so now there is one MORE INNWATCH task.
>
>For the moment, when you shutdown INND, you also need to kill the INNWATCH
>task (if DOINNWATCH=TRUE). Assuming that there is only ONE INNWATCH running
>at the time that INND is shutdown, then this will prevent multiple occurances
>of INNWATCH tasks.
>
>It should be fairly simple to test in RC.NEWS, or INNWATCH, whether an INNWATCH
>task is already running, and if so, to NOT execute (or quit from) INNWATCH.
>thus preventing multiple INNWATCH tasks. I think this would be best in RC.NEWS.

I realize that this is OS specific (Solaris 2.5.1), but it might help
anyway. I'm using it for my news 1.5.1 system I'm testing:

cat /etc/init.d/news
#! /bin/sh
##  $Revision: 1.12 $
##  News start/stop script.  Runs as "news" user.  Requires inndstart be
##  setuid root. See /etc/init.d/rc.news
##
##  Modified:   1997/03/12 MAS  Initial version.
##
##              yyyy/mm/dd iii  ...
##

inndpid=`/usr/bin/ps -e | /usr/bin/grep -v grep | /usr/bin/grep innd | /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`

case $1 in
'start')
        if [ "${pid}" = "" ]
        then
                if [ -x /etc/init.d/rc.news ]
                then
                        /opt/local/news/bin/rc.news >/dev/console 2>&1 &
                else
                        echo "unable to find /etc/init.d/rc.news, news not started."
                fi
                if [ -x /opt/local/news/bin/links ]
                then
                        echo "clearing nntplink datafiles"
                        /opt/local/news/bin/links clear
                else
                        echo "unable to find /opt/local/news/bin/links, nntplink datafiles not reset."
                fi
        fi
        ;;
'stop')
        if [ "${inndpid}" != "" ]
        then
                echo "stopping nntplink processes"
                if [ -x /opt/local/news/bin/links ]
                then
                        /opt/local/news/bin/links stop
                else
                        echo "unable to find /opt/local/news/bin/links, nntplink processes not stopped cleanly."
                fi
                if [ -x /opt/local/news/bin/ctlinnd ]
                then
                        echo "throttling news (innd)."
                        /opt/local/news/bin/ctlinnd throttle "news for shut down."
                        echo "shutdown news (innd)."
                        /opt/local/news/bin/ctlinnd shutdown "news."
                else
                        echo "unable to find /opt/local/news/bin/ctlinnd, news not shut down."
                fi
        else
                echo "news (innd) not running."
        fi

        innwatchpid=`/usr/bin/ps -e | /usr/bin/grep -v grep | /usr/bin/grep innwatch | /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`

        if [ "${innwatchpid}" != "" ]
        then
                echo "shutdown innwatch"
                /usr/bin/kill ${innwatchpid}
        else
                echo "innwatch not running."
        fi
        ;;
*)
        echo "usage: /etc/init.d/news {start|stop}"
        ;;
esac

-- 
Mark A. Stevens                      Phone:    708-235-2204
Systems Programmer/Administrator     Internet: xmas@uxa.ecn.bgu.edu
Educational Computing Network        WWW:      http://www.ECNet.Net/users/xmas/
Governors State University           VMSHARE:  ECE/MARK

Technical Details
Message-ID: <5hccq0$s0r@ecom7.ecn.bgu.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <242ade59.u9t27e.f0139@slip106.termserv.siu.edu>

Show Full Headers
Complete Article Headers
Message-ID: <5hccq0$s0r@ecom7.ecn.bgu.edu>
Subject: Re: innd 1.5.1 - multiple innwatches?
Date: Wed, 26 Mar 1997 00:00:00 +0000
From: xmas@uxa.ecn.bgu.edu (Mark A. Stevens)
References: <242ade59.u9t27e.f0139@slip106.termserv.siu.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 228698020
Distribution: inet
Organization: Educational Computing Network, Illinois USA
Newsgroups: news.software.nntp