#!/bin/bash
#
# webserver
#
# NOTICE OF LICENSE
#
# This source file is subject to the Open Software License (OSL 3.0)
# that is available through the world-wide-web at this URL:
# http://opensource.org/licenses/osl-3.0.php
#
# PHP version 5
#
# @category  Server
# @package   WebServer
# @author    Johann Zelger <jz@appserver.io>
# @copyright 2014 TechDivision GmbH <info@appserver.io>
# @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
# @link      https://github.com/appserver-io/webserver
##

# get base dir from bash source location
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";

# check if PHP_BIN was set. If not set appserver php as default.
[ -z "$PHP_BIN" ] && PHP_BIN="/opt/appserver/bin/php";

# call webserver script
$PHP_BIN -ddisplay_errors=1 -dappserver.php_sapi=webserver -ddate.timezone=Europe/Berlin -dauto_globals_jit=0 $BASE_DIR/../src/server.php $@
