#!/bin/sh
#
# runserver - Shell Script which will launch the PxPlus WebServer
#
# Copyright 2001 Best Software Canada Ltd.
# Ver 1.0 - GD 8/1/1999

CONFIGWEB=$0
PARENTID=$PPID
WEBDIR=`dirname $CONFIGWEB`
if [ $WEBDIR = "." ]
then
	WEBDIR=`pwd`
else
	WEBDIR=$WEBDIR
fi

HASWINTERM=`infocmp winterm 2>/dev/null`
if [ ! $? = 0 ]
then
	tic $WEBDIR/lib/_dev/winterm.tic
fi

TERM=ansi
PVXLIB=$WEBDIR/lib
export TERM PVXLIB

if [ "$PARENTID" = "1" ]
then
	nohup $WEBDIR/pxplus \*web/webserv >/dev/null </dev/null 2>&1
else
	nohup $WEBDIR/pxplus \*web/webserv >/dev/null </dev/null 2>&1 &
fi
