1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2025-06-05 22:19:21 +02:00

MycroftOS: Mimic a captive portal to auto start a browser on wifi connect.

This commit is contained in:
Peter Steenbergen
2019-12-31 16:59:43 +01:00
parent 34a89c5541
commit 3e6ec89558
12 changed files with 184 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#!/bin/bash
#
# Usage: iptables-flush [6]
#
iptables=ip$1tables
if ! type -p "$iptables"; then
echo "error: invalid argument"
exit 1
fi
while read -r table; do
tables+=("/var/lib/$iptables/empty-$table.rules")
done <"/proc/net/ip$1_tables_names"
if (( ${#tables[*]} )); then
cat "${tables[@]}" | "$iptables-restore"
fi