mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
84da40c40d
* move captive portal to its own role * runrole still not working * make apache name consistent, define py_captive_portal_port * record android fixes * some progress -- windows8.1 works but detectportal.firefox active for both mac and windows * works all platforms * one captive_portal_install not changed to py_captive... * port into defaults * windows 7,8,10,mac,ios,android 5,7 * add # to dnsmasq.d/captive * guess what android 8 might need * move captive portal to its own role * runrole still not working * make apache name consistent, define py_captive_portal_port * record android fixes * some progress -- windows8.1 works but detectportal.firefox active for both mac and windows * works all platforms * one captive_portal_install not changed to py_captive... * port into defaults * windows 7,8,10,mac,ios,android 5,7 * add # to dnsmasq.d/captive * guess what android 8 might need * restart apache2 and dnsmasq in role * do not hard code apache name * cut out disfunctional experiments * variable py_captive_portal_port misspelled * add wildcard serveralias to box.lan vhost to fix default * add in STDOUT to log * remove the py_ * add in msn to urls to capture * missed a few py_
15 lines
738 B
Bash
Executable file
15 lines
738 B
Bash
Executable file
#!/bin/bash -x
|
|
# Turn off URL recording mode, and return to serving with apache2
|
|
|
|
kill $(cat /opt/iiab/captive-portal/pid)
|
|
# during testing, I start capture by hand -- recorded pid may be stale
|
|
pid=$(ps aux | grep "capture-wsgi.py -d" | grep -v grep | awk '{print $2}')
|
|
if [ -n "$pid" ]; then
|
|
kill $pid
|
|
fi
|
|
awk '{print("address=/" $1 "/172.18.96.1")}' /opt/iiab/captive-portal/checkurls > /etc/dnsmasq.d/capture
|
|
echo "#following tells windows 7 that captive portal is active" >>/etc/dnsmasq.d/capture
|
|
echo "address=/dns.msftncsi.com/131.107.255.255" >> /etc/dnsmasq.d/capture
|
|
awk '{print("ServerAlias ",$1)}' /opt/iiab/captive-portal/checkurls > /etc/apache2/capture
|
|
systemctl start captive-portal
|
|
systemctl start {{ apache_service }}
|