🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Ricardo Stella Mon, 23 Feb 1998 00:00
Proper way to shutdown INN
#26475
Author: Ricardo Stella
Date: Mon, 23 Feb 1998 00:00
22 lines
1179 bytes
I understand that INN should be shutdown with 'ctlinnd shutdown reason'
but what about:

* innwatch
* actived

Would a kill to those processes be enough ?

Or, does anyone one have a decent rc.news script that ALSO does shutdown
?  This is needed for power outages, etc.

Thanks in advance...


-- 
------------------------------------------------------------------
 Ricardo Stella - O.I.T.                 stella@library.rider.edu
 Lib. 234C (609)896-5000 x7436  _suAve_  Rider University
  *** Remove 'no-spam' from e-mail address before replying.  ***

Re: Proper way to shutdown INN
#26504
Author: Hans Lambermont
Date: Tue, 24 Feb 1998 00:00
14 lines
1088 bytes
Ricardo Stella wrote:
> I understand that INN should be shutdown with 'ctlinnd shutdown reason'
> but what about:
> * innwatch
> * actived
> Would a kill to those processes be enough ?

That's ideed how i do it...

tia,
   Hans

Re: Proper way to shutdown INN
#26564
Author: Jeff Makey
Date: Fri, 27 Feb 1998 00:00
87 lines
2907 bytes
Below is the /etc/init.d/news script I use on my Solaris news server.
It is run as root and does an excellent job of cleanly starting and
stopping INN.  It requires this patch:

*** inn-1.5.1/samples/rc.news.~1~	Tue Dec 17 06:40:40 1996
--- inn-1.5.1/samples/rc.news	Thu Jun 26 20:23:26 1997
***************
*** 68,74 ****
  
  # Gee, looks like lisp, doesn't it?
  ${DOINNWATCH} && {
!     ( sleep 60 ; ${INNWATCH} ) &
  }
  
  RMFILE=${MOST_LOGS}/expire.rm
--- 68,74 ----
  
  # Gee, looks like lisp, doesn't it?
  ${DOINNWATCH} && {
!     echo "( sleep 60 ; ${INNWATCH} ) &" | su ${NEWSUSER}
  }
  
  RMFILE=${MOST_LOGS}/expire.rm

 -----------------------------------------------------------------

#!/sbin/sh
#
# /etc/init.d/news - Start/Stop the Usenet news system
#

HOME=`csh -cf 'echo ~news'`
if [ -z "$HOME" ] ; then
	exit 0	# news account does not exist
fi
if [ ! -r $HOME/etc/innshellvars ] ; then
	exit 0	# INN not installed in a known place
fi

. $HOME/etc/innshellvars

case $1 in 
    start)
	if [ -x $NEWSBIN/rc.news ] ; then
		# establish a clean environment when run by hand
		cd /
		env - TZ=$TZ PATH=/usr/bin:/usr/ucb:/usr/sbin $NEWSBIN/rc.news
	fi
	;;
    stop)
	if [ -r $WATCHPID ] ; then
		pid="`cat $WATCHPID`"
		# kill the innwatch shell script
		kill $pid
		pid="`ps -u news -o ppid,pid | sed -e \"/^ *$pid /!d\" -e \"s/.* //\"`"
		# then kill any child processes of innwatch
		if [ "$pid" ] ; then
			kill $pid
		fi
	fi
	if [ -p $NEWSCONTROL ] ; then
		ctlinnd -s throttle "Preparing to shut down."
		ctlinnd -s readers no "Preparing to shut down."
		sleep 5
		ctlinnd -s shutdown "as requested in $0"
	fi
	;;
    *)
	echo "usage: $0 {start|stop}"
	;;
esac

 -----------------------------------------------------------------

Note that it completely bypasses innstart, which no longer needs to be
setuid.  Throttling and disabling readers 5 seconds before the
shutdown might not be necessary, but it gives everyone a fair chance
to cleanly close their connections.  This does not kill nnrpd
processes.

                             :: Jeff Makey
                                jeff@sdsc.edu

Department of Tautological Pleonasms and Superfluous Redundancies Department

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads