mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Update iptables msgs
This commit is contained in:
parent
47af4c7815
commit
cd92bdae46
@ -24,7 +24,7 @@ fi
|
||||
|
||||
# Generate iptables entries to place into rc.local file.
|
||||
# #RASPAP is for uninstall script
|
||||
echo "Adding iptables rules for $interface"
|
||||
echo "Checking iptables rules for $interface"
|
||||
|
||||
lines=(
|
||||
"iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE #RASPAP"
|
||||
@ -34,9 +34,9 @@ lines=(
|
||||
|
||||
for line in "${lines[@]}"; do
|
||||
if grep "$line" /etc/rc.local > /dev/null; then
|
||||
# iptables rule exists
|
||||
else
|
||||
sudo sed -i "s/^exit 0$/$line\nexit 0/" /etc/rc.local
|
||||
echo "Adding rule: $line"
|
||||
fi
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user