#!/bin/sh -e . $IPKG_INSTROOT/etc/functions.sh . /etc/splash.sh echo -en "Status: 200 OK\r\n" echo -en "Content-Type: text/html\r\n" echo -en "\r\n" # decode request params URL="http://$(sed 's/target_url=//g' | urldecode)" USER_MAC=$(grep ^$REMOTE_HOST /dev/null uci -q set splash_users.@user[-1].mac=$USER_MAC uci -q set splash_users.@user[-1].time=`date +%s` fi unlockSplash # send response (encode / to not confuse sed) sed "s/targeturl/$(echo "$URL" | sed 's#/#\\/#g')/g" iframe.html