1
0
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:
billz 2019-11-17 19:08:39 +00:00
parent 47af4c7815
commit cd92bdae46

View File

@ -24,7 +24,7 @@ fi
# Generate iptables entries to place into rc.local file. # Generate iptables entries to place into rc.local file.
# #RASPAP is for uninstall script # #RASPAP is for uninstall script
echo "Adding iptables rules for $interface" echo "Checking iptables rules for $interface"
lines=( lines=(
"iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE #RASPAP" "iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE #RASPAP"
@ -34,9 +34,9 @@ lines=(
for line in "${lines[@]}"; do for line in "${lines[@]}"; do
if grep "$line" /etc/rc.local > /dev/null; then if grep "$line" /etc/rc.local > /dev/null; then
# iptables rule exists
else else
sudo sed -i "s/^exit 0$/$line\nexit 0/" /etc/rc.local sudo sed -i "s/^exit 0$/$line\nexit 0/" /etc/rc.local
echo "Adding rule: $line"
fi fi
done done