> It really appears to be a timing issue--the restart section of the
> script just does a stop and a start, but if you do those two things
> independently, or with a sleep 1 in the middle, the issue goes away.
I think now I understand what happens (I'm not on RedHat, so I would
have probably noticed it earlier): The stop command kills Webware, but
it does not wait until the process is really down. Instead, it
immediately removes the /var/run/$APP_NAME.pid file. But Webware is
still shutting down (and the $WORK_DIR/appserverpid.txt file is still
there). So, when it is immediately started again by the restart command,
it refuses to start because it is still in the shutdown process.
Suggested fix: After the kill command in the stop() function (before the
success call) put something like the following:
for tries in 1 2 3 4 5; do
if [ ! -d "/proc/$PID" ]; then
break
fi
sleep 1
done
Let me know whether this works or if you have a better solution. I will
improve this then in the SVN for the next version.
-- Christoph
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss