2 # Copyright (c) 2014-2014 IndexData ApS. http://indexdata.com
5 # generate temp config file for testing
8 export APACHE_SERVER_ROOT=$(pwd)
9 export APACHE_RUN_USER=$(whoami)
10 export APACHE_RUN_GROUP=$(groups | awk '{ print $1 }')
12 export APACHE_LOG_DIR=$APACHE_SERVER_ROOT/logs
13 export APACHE_PID_FILE=$APACHE_LOG_DIR/mkws-jasmine.pid
14 export APACHE_LOCK_FILE=$APACHE_LOG_DIR/accept.lock
15 : ${APACHE_PORT=4040}; export APACHE_PORT
17 export MKWS_ROOT=$(pwd)/..
21 apache2=$(env PATH=/usr/bin:/usr/sbin which apache2 httpd false 2>/dev/null | head -1)
24 Darwin ) MKWS_OS=macos
25 test -e libexec || ln -fs /usr/libexec .
27 Linux ) MKWS_OS=debian
28 if [ -e /etc/debian_version ]; then
30 if $apache2 -v | egrep -q 'Server version: Apache/2\.4\.'; then
34 if [ -e /etc/redhat-release ]; then
42 if [ "$APACHE_VERSION" = "2.4" ]; then
43 : ${MKWS_APACHE_TEMPLATE="$MKWS_ROOT/tools/apache2/jasmine-dev.template-$APACHE_VERSION"}
44 APACHE_MODULES="$MKWS_ROOT/tools/apache2/jasmine-dev.apache-modules-$APACHE_VERSION.$MKWS_OS.conf"
46 : ${MKWS_APACHE_TEMPLATE="$MKWS_ROOT/tools/apache2/jasmine-dev.template"}
47 APACHE_MODULES="$MKWS_ROOT/tools/apache2/jasmine-dev.apache-modules.$MKWS_OS.conf"
50 : ${MKWS_APACHE_FILE="$APACHE_LOG_DIR/jasmine-dev"}
53 perl -npe 's,\${(.*?)},$ENV{$1},g; ' $MKWS_APACHE_TEMPLATE > $MKWS_APACHE_FILE.tmp
54 mv -f $MKWS_APACHE_FILE.tmp $MKWS_APACHE_FILE