From 22f5ececf877407e5844839015f30cf5ea7024c5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 7 Oct 2016 18:26:38 +0100 Subject: [PATCH] hostapd start and stop --- src/freedombone-mesh-batman | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/freedombone-mesh-batman b/src/freedombone-mesh-batman index 43627e19..0e2b3a7b 100755 --- a/src/freedombone-mesh-batman +++ b/src/freedombone-mesh-batman @@ -145,6 +145,7 @@ function stop { ifconfig $EIFACE down -promisc fi if [ $IFACE_SECONDARY ]; then + systemctl stop hostapd brctl delif $BRIDGE_HOTSPOT bat0 ifconfig $BRIDGE_HOTSPOT down || true brctl delbr $BRIDGE_HOTSPOT @@ -287,7 +288,7 @@ function start { sed -i 's|#DAEMON_CONF=.*|DAEMON_CONF="/etc/hostapd/hostapd.conf"|g' /etc/default/hostapd - echo "interface=$IFACE_SECONDARY" > /etc/hostapd/hostapd.conf + echo "interface=${IFACE_SECONDARY}" > /etc/hostapd/hostapd.conf echo "bridge=${BRIDGE_HOTSPOT}" >> /etc/hostapd/hostapd.conf echo 'driver=nl80211' >> /etc/hostapd/hostapd.conf echo "country_code=UK" >> /etc/hostapd/hostapd.conf @@ -305,7 +306,8 @@ function start { ifconfig $BRIDGE_HOTSPOT up avahi-autoipd --force-bind --daemonize --wait $BRIDGE_HOTSPOT ifconfig $IFACE_SECONDARY up promisc - ifconfig $IFACE_SECONDARY auto-dhcp start + #ifconfig $IFACE_SECONDARY auto-dhcp start + systemctl start hostapd fi fi fi