I'm trying to get a good debugging environment. It seems that the docs
say the print statements go to stdout so that seems like a good place to
start. I use this script to start the appserver but print statements do
not go to the $LOG file like I would hope. Is this hoe it can work or
do I need to start the appserver from the command line to get them to
appear there?
#!/bin/sh
#
# Startup script for WebKit on UNIX systems.
#
# See Webware/WebKit/Docs/InstallGuide.html for instructions.
# chkconfig: 2345 75 25
# description: WebKit is a Python application server, part of Webware.
# Configuration section
#WEBKIT_DIR=/usr/local/src/Webware-0.7/WebKit
WEBKIT_DIR=/home/michael/Webware
#WEBKIT_DIR=/opt/Webware/WebKit
PID_FILE=/var/run/webkit.pid
LOG=/var/log/webkit
PYTHONPATH=
# end configuration section
# Source function library.
# Use the funtions provided by Red Hat or use our own
if [ -f /etc/rc.d/init.d/functions ]
then
. /etc/rc.d/init.d/functions
else
function action {
echo "$1"
shift
$@
}
function success {
echo -n "Success"
}
function failure {
echo -n "Failed"
}
fi
[ -x $WEBKIT_DIR/AppServer ] || exit 0
case "$1" in
start)
echo -n "Starting WebKit: "
pushd $WEBKIT_DIR > /dev/null
LAUNCH='python Launch.py ThreadedAppServer'
# log separator
echo
"----------------------------------------------------------------------" >> $LOG
# run as root:
$LAUNCH >> $LOG 2>&1 &
# run as a user named 'webware':
#su -c "$LAUNCH" webware >> $LOG 2>&1 &
echo $! > $PID_FILE
popd > /dev/null
success "Starting WebKit"
echo
;;
stop)
echo -n "Shutting down WebKit: "
if test -f "$PID_FILE" ; then
PID=`cat $PID_FILE`
if kill $PID >> $LOG 2>&1 ; then
/bin/rm $PID_FILE
success "Shutting down WebKit"
else
echo ""
echo "Could not kill process $PID named in $PID_FILE.
Check tail of $LOG."
failure "Shutting down WebKit"
fi
else
echo ""
echo "No WebKit pid file found. Looked for $PID_FILE."
failure "No WebKit pid file found. Looked for $PID_FILE."
fi
echo
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: webkit {start|stop|restart}"
exit 1
esac
exit 0
--
Michael Montagne
[EMAIL PROTECTED]
http://www.themontagnes.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss