diff options
Diffstat (limited to 'sca-cpp/trunk/modules/http/open-auth-conf')
-rwxr-xr-x | sca-cpp/trunk/modules/http/open-auth-conf | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sca-cpp/trunk/modules/http/open-auth-conf b/sca-cpp/trunk/modules/http/open-auth-conf index 9c209b8685..5226622058 100755 --- a/sca-cpp/trunk/modules/http/open-auth-conf +++ b/sca-cpp/trunk/modules/http/open-auth-conf @@ -22,6 +22,13 @@ here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $h mkdir -p $1 root=`echo "import os; print os.path.realpath('$1')" | python` +uname=`uname -s` +if [ $uname = "Darwin" ]; then + libsuffix=".dylib" +else + libsuffix=".so" +fi + conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` @@ -32,7 +39,19 @@ else sslsuffix="-ssl" fi -pw=`cat $root/cert/ca.key | head -2 | tail -1` +if [ "$2" = "" ]; then + pw=`cat $root/cert/ca.key | head -2 | tail -1` +else + pw="$2" +fi + +# Configure HTTPD mod_tuscany_openauth module +cat >>$root/conf/modules.conf <<EOF +# Generated by: openauth-conf $* +# Load support for Open authentication +LoadModule mod_tuscany_openauth $here/libmod_tuscany_openauth$libsuffix + +EOF # Disallow public access to server resources cat >$root/conf/noauth$sslsuffix.conf <<EOF |