diff options
Diffstat (limited to 'sca-cpp/trunk/hosting/server/delete-auth')
-rwxr-xr-x | sca-cpp/trunk/hosting/server/delete-auth | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sca-cpp/trunk/hosting/server/delete-auth b/sca-cpp/trunk/hosting/server/delete-auth index 407d730c80..ffd7044e2d 100755 --- a/sca-cpp/trunk/hosting/server/delete-auth +++ b/sca-cpp/trunk/hosting/server/delete-auth @@ -18,14 +18,16 @@ # under the License. here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` -mkdir -p $1 +mkdir -p $1/conf root=`echo "import os; print os.path.realpath('$1')" | python` admin=$2 apass=$3 -user=$4 +email=$4 +host=$5 httpd_prefix=`cat $here/../../modules/http/httpd.prefix` +if [ "$host" = "" ]; then conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` sslconf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-ssl-conf"` if [ "$sslconf" = "" ]; then @@ -45,17 +47,14 @@ else fi port=`$here/../../modules/http/httpd-addr port $ssladdr` fi - -# Compute user id -slash=`echo $user | grep "/"` -if [ "$slash" = "" ]; then - id="\"$user\"" - upath=$user else - id=`echo $user | awk -F "/" '{ printf "\"%s\" \"%s\"", $2, $3 }'` - upath=`echo $user | awk -F "/" '{ printf "%s/%s", $2, $3 }'` + scheme="https" + port="443" fi +# Compute user URI +upath=$email + # Delete user auth curl -k -L -u $admin:$apass -X DELETE -H "X-Forwarded-Server: $host" $scheme://$host:$port/c/Authenticator/$upath |