mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
need capture-wsgi as template to soft code port
This commit is contained in:
parent
8ad3f76bf1
commit
85577aaf13
2 changed files with 5 additions and 5 deletions
|
@ -23,8 +23,8 @@
|
|||
- { src: roles/captiveportal/templates/iiab-divert-to-nginx, mode: '0755', dest: /usr/sbin/ }
|
||||
|
||||
- name: Put put the python script that creates the server in place
|
||||
copy:
|
||||
src: roles/captiveportal/files/capture-wsgi.py
|
||||
template:
|
||||
src: roles/captiveportal/templates/capture-wsgi.py
|
||||
mode: '0755'
|
||||
dest: /opt/iiab/captiveportal/
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ logger = logging.getLogger('/var/log/apache2/portal.log')
|
|||
handler = RotatingFileHandler("/var/log/apache2/portal.log", maxBytes=100000, backupCount=2)
|
||||
logger.addHandler(handler)
|
||||
|
||||
#PORT={{ captiveportal_port }}
|
||||
PORT=9090
|
||||
PORT={{ captiveportal_port }}
|
||||
#PORT=9090
|
||||
|
||||
|
||||
# Define globals
|
||||
|
@ -394,7 +394,7 @@ def application (environ, start_response):
|
|||
data = ['{}: {}\n'.format(key, value) for key, value in sorted(environ.items()) ]
|
||||
#logger.debug("need the correct ip:{}".format(data))
|
||||
ip = environ['REMOTE_ADDR'].strip()
|
||||
cmd="arp -an {}|gawk \'{{print $4}}\'".format(ip)
|
||||
cmd="arp -an %s|gawk \'{print $4}\'"%(ip)
|
||||
mac = subprocess.check_output(cmd, shell=True)
|
||||
data = []
|
||||
data.append("host: {}\n".format(environ['HTTP_HOST']))
|
Loading…
Reference in a new issue