1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Merge branch 'armbian-buster' of https://github.com/billz/raspap-webgui into armbian-buster

This commit is contained in:
billz 2020-03-22 13:59:38 +00:00
commit eef84597d0
2 changed files with 5 additions and 2 deletions

View File

@ -291,7 +291,7 @@ function enable_raspap_daemon() {
function configure_networking() { function configure_networking() {
install_log "Configuring networking" install_log "Configuring networking"
echo "Enabling IP forwarding" echo "Enabling IP forwarding"
echo "net.ipv4.ip_forward=1" | sudo tee $raspap_sysctl || install_error "Unable to set IP forwarding" echo "net.ipv4.ip_forward=1" | sudo tee $raspap_sysctl > /dev/null || install_error "Unable to set IP forwarding"
sudo sysctl -p $raspap_sysctl || install_error "Unable to execute sysctl" sudo sysctl -p $raspap_sysctl || install_error "Unable to execute sysctl"
sudo /etc/init.d/procps restart || install_error "Unable to execute procps" sudo /etc/init.d/procps restart || install_error "Unable to execute procps"
@ -299,7 +299,7 @@ function configure_networking() {
sudo iptables -t nat -A POSTROUTING -j MASQUERADE || install_error "Unable to execute iptables" sudo iptables -t nat -A POSTROUTING -j MASQUERADE || install_error "Unable to execute iptables"
sudo iptables -t nat -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE || install_error "Unable to execute iptables" sudo iptables -t nat -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE || install_error "Unable to execute iptables"
echo "Persisting IP tables rules" echo "Persisting IP tables rules"
sudo iptables-save | sudo tee /etc/iptables/rules.v4 sudo iptables-save | sudo tee /etc/iptables/rules.v4 > /dev/null || install_error "Unable to execute iptables-save"
# Prompt to install RaspAP daemon # Prompt to install RaspAP daemon
echo -n "Enable RaspAP control service (Recommended)? [Y/n]: " echo -n "Enable RaspAP control service (Recommended)? [Y/n]: "

View File

@ -59,6 +59,9 @@ if [ -r "$CONFIGFILE" ]; then
if [ "${config[BridgedEnable]}" = 1 ]; then if [ "${config[BridgedEnable]}" = 1 ]; then
if [ "${interface}" = "br0" ]; then if [ "${interface}" = "br0" ]; then
echo "Stopping systemd-networkd"
systemctl stop systemd-networkd
echo "Restarting eth0 interface..." echo "Restarting eth0 interface..."
ip link set down eth0 ip link set down eth0
ip link set up eth0 ip link set up eth0