#!/bin/sh
######################################################################
#
#   httpd startup script
#
#   Created: 3/22/99
#   J. Robert von Behren <rob@lyris.com>
#   Copyright Lyris Technologies, 1999
#
#   NOTE: This script assumes that the following UNIX utilities are in
#   the path and behave in the usual fashion:
#       dirname pwd find egrep
#
######################################################################


#
#  Figure out the installation path
#
base=`basename $0`
basedir=`dirname $0`
dir=`(cd $basedir; cd ..; pwd)`
if [ ! -f "$dir/bin/$base" ]; then
    echo "Can't determine installation directory - exiting."
    exit 1
fi


#
#  Set the perl library directory
#
if [ "x$PERL5LIB" = "x" ]; then
    PERL5LIB="$dir/lib"
else
    PERL5LIB="$dir/lib:$PERL5LIB"
fi
export PERL5LIB

#
#  Decide on the config file to use
#
conf="$dir/conf/httpd.conf.unix"
if [ -f "$dir/conf/httpd.conf.noperl" ]; then
    conf="$dir/conf/httpd.conf.noperl"
fi


#
#  Start the web server
#
echo "starting Lyris web server...."
$dir/bin/apache-lyris -d $dir -f $conf







