mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
bug fixes to default_configuration(). Resolves #174. Thanks @Austin-RR
This commit is contained in:
parent
b9bd1cf46f
commit
98ace52351
@ -191,15 +191,16 @@ function default_configuration() {
|
||||
# Generate required lines for Rasp AP to place into rc.local file.
|
||||
# #RASPAP is for removal script
|
||||
lines=(
|
||||
'echo 1 > /proc/sys/net/ipv4/ip_forward #RASPAP'
|
||||
'echo 1 > \/proc\/sys\/net\/ipv4\/ip_forward #RASPAP'
|
||||
'iptables -t nat -A POSTROUTING -j MASQUERADE #RASPAP'
|
||||
|
||||
)
|
||||
|
||||
for line in "${lines[@]}"; do
|
||||
if grep "$line" /etc/rc.local > /dev/null; then
|
||||
echo "$line: Line already added"
|
||||
else
|
||||
sed -i "s/exit 0/$line\nexit0/" /etc/rc.local
|
||||
sudo sed -i "s/^exit 0$/$line\nexit 0/" /etc/rc.local
|
||||
echo "Adding line $line"
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user