On Mon, 2001-11-26 at 12:10, Jeff Johnson wrote:
> "start" and "stop" seem to work ok but "restart" only works if there is
> no load on the server since the start doesn't wait for the stop to
> complete.  Any ideas on fixing that?  Is there a way to sleep until the
> old PID is killed?  

Hmmm... a really crude way might be something like:

while [ `ps aux | grep python` != "" ] ; do
done

But maybe better might be if Webware deleted some lock file when it
closed down, so you could do:

while [ -e /var/lock/webkit ] ; do
done

I haven't had a problem with this, though... when I kill the processes
they disapear instantly... but that may be because I kill all the
"python Launch.py" processes as well.  Of course, if I ever want to run
more than one AppServer that technique will fail badly...

> The "functions" library doesn't seem to exist on BSD and "pushd" and
> "popd" only seem to exist in csh so I changed them to "cd" and "cd -".
> I got rid of "success" because I don't know what it does and can't find
> its equivalent.  Anyone know?

success doesn't do anything, really -- it prints a pretty [OK] on
RedHat.  

> -Jeff
> 
> Here's my script so far:
> 
> #!/bin/sh
> #
> # Startup script for WebKit
> # on FreeBSD systems.
> #
> # See Webware/WebKit/Docs/InstallGuide.html for instructions.
> 
> # chkconfig: 2345 75 25
> # description: WebKit is Python application server, part of Webware.
> 
> #WEBKIT_DIR=/usr/Webware/WebKit
> WEBKIT_DIR=/usr/local/deg/www/EA/webkit
> PID_FILE=/usr/local/deg/www/EA/webkit/appserverpid.txt
> LOG=/usr/local/deg/logs/EA/webkit_ea.log
> PYTHONPATH=
> PYTHONPATH_ADDONS=
> 
> 
> [ -f $WEBKIT_DIR/AppServer ] || exit 0
> 
> case "$1" in
>       start)
>               echo -n  "Starting WebKit: "
>               cd $WEBKIT_DIR > /dev/null
>               PYTHONPATH="$PYTHONPATH $PYTHONPATH_ADDONS" ./AppServer
> >> $LOG 2>&1 &
>               #echo $! > $PID_FILE
>               cd - > /dev/null
>               #success "Starting WebKit"
>               echo
>               ;;
> 
>       stop)
>               echo -n "Shutting down WebKit: "
>               kill `cat $PID_FILE`
>               #success "Shutting down WebKit"
>               echo
>               ;;
> 
>       restart)
>               $0 stop
>               $0 start
>               ;;
> 
>       *)
>               echo "Usage: webkit {start|stop|restart}"
>               exit 1
> 
> esac
> 
> exit 0
> 
> 
> 
> 
> 
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
> 



_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to