mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
bug fixes to default_configuration(). Resolves #174. Thanks @Austin-RR
This commit is contained in:
parent
b9bd1cf46f
commit
98ace52351
1 changed files with 3 additions and 2 deletions
|
@ -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 a new issue