installvpn.py
-------------------------------------------------------
from mod_python import apache, util
from tempfile import mktempimport traceback
import os
import json
#import esutil
#import hostapi
import urllib
import time
#import hostexe
HTML_DIR = "/opt/emserver/portal/www/html"
def handler(req):
'''
Authenticate user account, get userID and accountID from hosted DB.
'''
try:
#esutil.emserver_log("installvpn.py - test push vpn intefeace")
#content = req.read()
#esutil.emserver_log("installvpn.py - request content from vpn: is %s" %content)
#req.write("call back service responseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
#fd = open('/tmp/abc.log', 'w+')
#fd.write('abc')
#fd.close
return apache.OK
#return 200
except:
#esutil.emserver_log("installvpn.py - %s" % traceback.format_exc())
return apache.HTTP_INTERNAL_SERVER_ERROR