Skip Navigational Links
LISTSERV email list manager
LISTSERV - COMMUNITY.EMAILOGY.COM
LISTSERV Menu
Log In
Log In
LISTSERV 17.5 Help - LSTSRV-L Archives
LISTSERV Archives
LISTSERV Archives
Search Archives
Search Archives
Register
Register
Log In
Log In

LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Menu
LISTSERV Archives LISTSERV Archives
LSTSRV-L Home LSTSRV-L Home

Log In Log In
Register Register

Subscribe or Unsubscribe Subscribe or Unsubscribe

Search Archives Search Archives
Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
Re: Problem starting ListServ via init script
From:
Christopher Wilson <[log in to unmask]>
Reply To:
LISTSERV site administrators' forum <[log in to unmask]>
Date:
Thu, 4 Jan 2007 12:03:59 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (115 lines)
All-

I noticed this problem with setting up a scheduled weekly restart of
listserv 15.0 under linux to get the logs rotating. After lots of head
scratching and pounding, I think this has to do with the way that the lsv
executable is called at the end of the 'go' script. (i.e. as a background
execution rather than an explicit fork). This results in the script waiting
around for a return code from a process that hasn't terminated when it is
started from a non-interactive shell, probably due to the lsv binary not
truly forking and divorcing from the terminal correctly. What I did was
stick a perl script in the middle which does the fork, and then the child
process does an exec() on lsv, while the parent returns and exits so that
the shell scripts get their return codes, don't wind up waiting on lsv to
finish, and complete as expected.

-Chris

On Wed, 23 Aug 2006 16:37:49 -0700, Harris, Jason (DIS) <[log in to unmask]>
wrote:

>I've had Listserv for Solaris 9 and for Suse 9.  In both cases, Listserv
would not let go of the starting process unless started manually or via
/etc/inittab.  Rc and cron starts would hang.  I've tried "go > logfile",
"go bg > logfile".  I've tried "&" and "nohup" methods as well, but in all
cases except for manual and inittab, Listserv would not background for my
two OS's.   Perhaps it is different for others'.   To keep my log files a
managable size, I have one cron job to stop Listserv weekly, and another
cron job to start it a minute later.  The starting cron job shell ends up
hanging around in memory for a week, but it goes down once lsv is killed and
the shell output is > null anyway.
>
>Installation instructions say to put it in inittab:
>http://www.lsoft.com/manuals/1.8e/unixinst.html#Autostart
>
>
>
>
>
>-----Original Message-----
>From: LISTSERV site administrators' forum
[mailto:[log in to unmask]] On Behalf Of Graham Tolliver
>Sent: Wednesday, August 23, 2006 11:08
>To: [log in to unmask]
>Subject: Problem starting ListServ via init script
>
>Hello,
>
>I am running a Solaris 10 box.
>
>When I restarted the box, the script that runs ListServ doesn't load 
>properly, hence preventing all of the other rc3 init scripts from 
>loading properly.
>
>The script will run properly if I run it from the command line.
>
>Here is part of the output from 
>/var/svc/log/milestone-multi-user-server:default.log:
>
>[ Aug 23 14:07:11 Executing start method ("/sbin/rc3") ]
>Executing legacy init script "/etc/rc3.d/S100listserv".
>Starting Listserv...Sun Microsystems Inc.       SunOS 5.10      Generic 
>January 2005
>You have mail.
> > Starting LISTSERV as a background process
>done.
>Legacy init script "/etc/rc3.d/S100listserv" exited with return code 0.
>Executing legacy init script "/etc/rc3.d/S16boot.server".
>Legacy init script "/etc/rc3.d/S16boot.server" exited with return code 0.
>Executing legacy init script "/etc/rc3.d/S50apache".
>httpd starting.
>Legacy init script "/etc/rc3.d/S50apache" exited with return code 0.
>Executing legacy init script "/etc/rc3.d/S52imq".
>
>
>Here is the init script:
>
>#!/bin/sh
>#      
># The listserv startup and shutdown script
>#                                       
># It should be linked to appropriate files in /etc/rc2.d
>#                                                     
>
>
>USAGE="Usage: $0 {start | stop}"
>LISTSERV_DIR=/local/listserv
>LISTSERV_PID=${LISTSERV_DIR}/spool/listserv.PID
>
>if [ ! -d ${LISTSERV_DIR} ]    
>then            # /local not mounted ??
>        exit 0
>fi       
> 
>case "$1" in
>    'start')   
>        /usr/bin/printf "Starting Listserv..."
>        /usr/bin/su - listserv -c "cd $LISTSERV_DIR &&amp; ./go bg"
>        /usr/bin/printf "done.\n"
>        ;;
>         
>    'stop')  
>        /usr/bin/printf "Stopping listserv..."
>        PID=`/usr/bin/cat ${LISTSERV_PID}`
>        kill $PID
>        /usr/bin/printf "done.\n"
>        ;;
>    *) 
>        echo ${USAGE}
>        exit 1
>        ;;
>esac     
>
>
>Thanks in advance!

ATOM RSS1 RSS2

COMMUNITY.EMAILOGY.COM CataList Email List Search Powered by LISTSERV