From cc0d220e305be21c617ee3fa8e6cd8848f355201 Mon Sep 17 00:00:00 2001 From: billz Date: Sun, 22 Mar 2020 13:41:48 +0000 Subject: [PATCH] Restore stop/start systemd-networkd in bridge mode --- installers/servicestart.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/installers/servicestart.sh b/installers/servicestart.sh index 5f6145e3..076de9fb 100755 --- a/installers/servicestart.sh +++ b/installers/servicestart.sh @@ -1,12 +1,12 @@ #!/bin/bash -# When wireless client AP mode is enabled, this script handles starting +# When wireless client AP or Bridge mode is enabled, this script handles starting # up network services in a specific order and timing to avoid race conditions. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin NAME=raspapd DESC="Service control for RaspAP" CONFIGFILE="/etc/raspap/hostapd.ini" -DAEMONPATH="/lib/systemd/system/raspap.service" +DAEMONPATH="/lib/systemd/system/raspapd.service" OPENVPNENABLED=$(pidof openvpn | wc -l) positional=() @@ -36,6 +36,7 @@ set -- "${positional[@]}" echo "Stopping network services..." systemctl stop openvpn-client@client +systemctl stop systemd-networkd systemctl stop hostapd.service systemctl stop dnsmasq.service systemctl stop dhcpcd.service @@ -64,8 +65,15 @@ if [ -r "$CONFIGFILE" ]; then echo "Removing uap0 interface..." iw dev uap0 del + + echo "Enabling systemd-networkd" + systemctl start systemd-networkd + systemctl enable systemd-networkd fi else + echo "Disabling systemd-networkd" + systemctl disable systemd-networkd + echo "Removing br0 interface..." ip link set down br0 ip link del dev br0