projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
general support for apache 2.4, MKWS-332
[mkws-moved-to-github.git]
/
test
/
bin
/
apache-template-update
diff --git
a/test/bin/apache-template-update
b/test/bin/apache-template-update
index
25cfdaf
..
1d57632
100755
(executable)
--- a/
test/bin/apache-template-update
+++ b/
test/bin/apache-template-update
@@
-1,5
+1,5
@@
#!/bin/sh
#!/bin/sh
-# Copyright (c) 2014-2014 IndexData ApS. http://indexdata.com
+# Copyright (c) 2014-2014 Index Data ApS. http://indexdata.com
# Wolfram Schneider
#
# generate temp config file for testing
# Wolfram Schneider
#
# generate temp config file for testing
@@
-9,16
+9,17
@@
export APACHE_SERVER_ROOT=$(pwd)
export APACHE_RUN_USER=$(whoami)
export APACHE_RUN_GROUP=$(groups | awk '{ print $1 }')
export APACHE_RUN_USER=$(whoami)
export APACHE_RUN_GROUP=$(groups | awk '{ print $1 }')
-export APACHE_LOG_DIR=$APACHE_SERVER_ROOT/logs
-export APACHE_PID_FILE=$APACHE_LOG_DIR/mkws-jasmine.pid
-export APACHE_LOCK_FILE=$APACHE_LOG_DIR/accept.lock
: ${APACHE_PORT=4040}; export APACHE_PORT
: ${APACHE_PORT=4040}; export APACHE_PORT
+export APACHE_LOG_DIR=$APACHE_SERVER_ROOT/logs
+export APACHE_PID_FILE=$APACHE_LOG_DIR/mkws-jasmine-${APACHE_PORT}.pid
+export APACHE_LOCK_FILE=$APACHE_LOG_DIR/accept-${APACHE_PORT}.lock
+
export MKWS_ROOT=$(pwd)/..
MKWS_OS=debian
APACHE_VERSION=2.2
export MKWS_ROOT=$(pwd)/..
MKWS_OS=debian
APACHE_VERSION=2.2
-apache2=$(env PATH=/usr/bin:/usr/sbin which apache2 httpd false 2>/dev/null | head -1)
+apache2=$(env PATH=/bin:/usr/bin:/usr/sbin which apache2 httpd false 2>/dev/null | head -1)
case $(uname) in
Darwin ) MKWS_OS=macos
case $(uname) in
Darwin ) MKWS_OS=macos
@@
-27,9
+28,6
@@
case $(uname) in
Linux ) MKWS_OS=debian
if [ -e /etc/debian_version ]; then
MKWS_OS=debian
Linux ) MKWS_OS=debian
if [ -e /etc/debian_version ]; then
MKWS_OS=debian
- if $apache2 -v | egrep -q 'Server version: Apache/2\.4\.'; then
- APACHE_VERSION=2.4
- fi
fi
if [ -e /etc/redhat-release ]; then
MKWS_OS=centos
fi
if [ -e /etc/redhat-release ]; then
MKWS_OS=centos
@@
-38,6
+36,10
@@
case $(uname) in
* ) MKWS_OS=debian ;;
esac
* ) MKWS_OS=debian ;;
esac
+if $apache2 -v | egrep -q 'Server version: Apache/2\.4\.'; then
+ APACHE_VERSION=2.4
+fi
+
if [ "$APACHE_VERSION" = "2.4" ]; then
: ${MKWS_APACHE_TEMPLATE="$MKWS_ROOT/tools/apache2/jasmine-dev.template-$APACHE_VERSION"}
if [ "$APACHE_VERSION" = "2.4" ]; then
: ${MKWS_APACHE_TEMPLATE="$MKWS_ROOT/tools/apache2/jasmine-dev.template-$APACHE_VERSION"}
@@
-47,7
+49,7
@@
else
APACHE_MODULES="$MKWS_ROOT/tools/apache2/jasmine-dev.apache-modules.$MKWS_OS.conf"
fi
APACHE_MODULES="$MKWS_ROOT/tools/apache2/jasmine-dev.apache-modules.$MKWS_OS.conf"
fi
-: ${MKWS_APACHE_FILE="$APACHE_LOG_DIR/jasmine-dev"}
+: ${MKWS_APACHE_FILE="$APACHE_LOG_DIR/jasmine-dev-${APACHE_PORT}.conf"}
export APACHE_MODULES
perl -npe 's,\${(.*?)},$ENV{$1},g; ' $MKWS_APACHE_TEMPLATE > $MKWS_APACHE_FILE.tmp
export APACHE_MODULES
perl -npe 's,\${(.*?)},$ENV{$1},g; ' $MKWS_APACHE_TEMPLATE > $MKWS_APACHE_FILE.tmp