#!/bin/ksh -p

# $Id: runmx4j.ksh,v 1.1 2004/03/17 16:30:37 blaine Exp $
# This is a UNIX script for starting up the MX4J HttpAdaptor with a HTML
# transformer.

# Invoke like "nohup ./run.ksh"

set +u
[ -e httpd.pid ] && kill -INT $(<httpd.pid) 2>&-
sleep 1
rm -f httpd.pid

export CLASSPATH=.:/usr/local/mx4j/lib/mx4j.jar:/usr/local/mx4j/lib/mx4j-tools.jar:dist/tst.jar:offlimits:lib/xercesImpl.jar:lib/xalan.jar:lib/xml-apis.jar
ksh -c 'print $$ > httpd.pid;
exec java $SECURITY_SETTINGS MX4JHttpAdaptor' > stdout.txt 2> stderr.txt &

# Alternatively, to run in foreground...
#java $SECURITY_SETTINGS MX4JHttpAdaptor
