cleanup generated apache
[mkws-moved-to-github.git] / test / bin / apache-template-update
1 #!/bin/sh
2 # Copyright (c) 2014-2014 IndexData ApS. http://indexdata.com
3 # Wolfram Schneider
4 #
5 # generate temp config file for testing
6 #
7
8 export APACHE_SERVER_ROOT=$(pwd)
9 export APACHE_RUN_USER=$(whoami)
10 export APACHE_RUN_GROUP=$(groups | awk '{ print $1 }')
11
12 export APACHE_LOG_DIR=$APACHE_SERVER_ROOT/logs
13 export APACHE_PID_FILE=$APACHE_LOG_DIR/mkws-jasmine.pid
14 export APACHE_PORT=4040
15
16 export MKWS_ROOT=$(pwd)/..
17
18 : ${MKWS_APACHE_TEMPLATE="$MKWS_ROOT/tools/apache2/jasmine-dev.template"}
19 : ${MKWS_APACHE_FILE="$APACHE_LOG_DIR/jasmine-dev"}
20
21 perl -npe 's,\${(.*?)},$ENV{$1},g; ' $MKWS_APACHE_TEMPLATE > $MKWS_APACHE_FILE.tmp
22 mv -f $MKWS_APACHE_FILE.tmp $MKWS_APACHE_FILE
23