#!/bin/sh # # CGI which process the request of the user _after_ he/she has pressed continue # # Rick van der Zwet # PATH=$PATH:/usr/local/bin:/usr/sbin:/usr/bin:/sbin DB=/tmp/authenticated.txt REMOTE_MAC=`arp -n $REMOTE_ADDR | awk '{print $4}'` # Add entry to authorized list sudo pfctl -q -t wlportal -T delete $REMOTE_ADDR # Redirect to proper page echo 'Content-Type: text/html' echo 'Refresh: 60; url=/portal/login' echo '' sed -e "s/\$REMOTE_ADDR/$REMOTE_ADDR/" \ -e "s/\$REMOTE_MAC/$REMOTE_MAC/" \ `dirname $0`/index.html.tmpl