Yep,
But that is what phoenix.sh does after stopping the process (but is failing
to do).

As i said: "service james stop" does delete the file, but "shutdown -r now"
doesnt.

For now it is working with the modified phoenix.sh start section.
I will continue messing with these scripts when i have some spare time, to
try and determine what is going on.  My guess is that "shutdown -r now" is
inpatient, and is killing the script somewhere.

Daniel.


-----Original Message-----
From: Ray Tran [mailto:[EMAIL PROTECTED]
Sent: 05 March 2004 10:17
To: James Users List
Subject: Re: load at bootup


The normal way of dealing with this is to delete the pid file in the
stop) section after doing whatever
stops the service. e.g. assuming the pidfile is /var/run/james.pid :
        stop)
            echo -n "Shutting down James Mail Server "
            export JAVA_HOME=/usr/local/java
            /opt/james/bin/phoenix.sh stop
            rm /var/run/james.pid
           echo
           ;;

Daniel Perry wrote:

>This was not fun to solve.  For some reason, the phoenix.pid file is
getting
>left behind. So when it reboots is doesnt startup - phoenix.sh just says
>it's started! i was being fooled by the shell script :(
>
>Anyway, i found a couple of ways round this - simply change
>/etc/init.d/james so that the start part deletes the pid file!
>but this is sloppy as you could start it twice using service start.
>
>So, the better way is to alter phoenix.sh so it doesnt just look for the
>file - it verifies that the pid file is a process! This is my first attempt
>at shell coding, so it's a bit unprofessional looking, but it works!
>
>Simply replace the origional code:
>
>        if [ -f $PHOENIX_PID ]
>        then
>            echo "Already Running!!"
>            exit 1
>        fi
>
>With:
>
>if [ -f $PHOENIX_PID ]
>then
>        phpid=`cat $PHOENIX_PID 2>/dev/null`
>        piddata=`ps $phpid | grep phoenix.home 2>/dev/null`
>        if [ "$piddata" != "" ]
>        then
>                echo "Already Running!!"
>                exit 1
>        fi
>fi
>
>Not sure wether the phoenix team would be interested in doing somthing
>similar so as to avoid this kind of problem!
>
>Daniel.
>
>-----Original Message-----
>From: Daniel Perry [mailto:[EMAIL PROTECTED]
>Sent: 03 March 2004 17:55
>To: James Users List
>Subject: RE: load at bootup
>
>
>Ok, i went down this service approach (tried both approaches - symlink to
>phoenix, and the script noel sent).
>
>It works a treat with "service james start", "service james stop".
>
>BUT, if i reboot, it doesnt start up properly. (this only if it was running
>at reboot).
>
>Phoenix does start because if you try to start james again it says it's
>already running! However, it isnt listening on any ports. stop it and start
>it and it's fine.
>
>Note, it also doesnt generate any log files.
>
>To clarrify:
>
>if james is running fine, and i do:
># shutdown -r now"
>when the server reboots, james is running, but doesnt listen!
>
>if james is running fine, and i do:
># service james stop
># shutdown -r now
>when the server reboots, james is running, and is listening!
>
>Any ideas? cos i'm stumped!
>
>Thanks,
>
>Daniel.
>
>
>
>-----Original Message-----
>From: Noel J. Bergman [mailto:[EMAIL PROTECTED]
>Sent: 01 March 2004 16:29
>To: James Users List
>Subject: RE: load at bootup
>
>
>Serge Knystautas wrote:
>
>
>>Daniel Perry wrote:
>>
>>
>>>How would I go about starting james on bootup (Linux)?
>>>I'm using Fedora core 1 if that's any help!
>>>
>>>
>
>
>
>>I create a symlink to make James a service, then set that service to
>>start at boot time...
>>
>>
>
>
>
>>ln -s /usr/local/james/bin/phoenix.sh /etc/init.d/james
>>
>>
>
>
>
>>Then put a link to that in rc3.d or however you want to make the service
>>start at boot time.
>>
>>
>
>I use the attached.  Place it, or a symlink, in /etc/rc.d/init.d.  Then run
>
> $ chkconfig --add james
>
>to have it installed.  See "man chkconfig" for other options.  The easy way
>to access the scripts is the service command, e.g.,
>
> $ service james [start | stop | restart]
>
>phoenix.sh has some options not yet supported in this script, but doesn't
>integrate with the runlevel level scheme.
>
>       --- Noel
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
Regards,

--
Ray Tran



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to